Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Help please! Images and links, Float property.
Old 09-12-2007, 09:39 PM Help please! Images and links, Float property.
Super Talker

Posts: 132
Trades: 0
I have an issue that I can't figure out.
Code:
http://thenavidsonrecord.com/ne/index.php
On that page, I ended up having to give each of the images on the bottom their own div. I gave each div a different border. As you can see, the divs and images are sitting correctly.
NOW..
I then gave links a YELLOW border, which you can also see there.
Obviously they are not positioned correctly.
here is my source html and css
Code:
<div id="lowerNav">
        <?php readfile("lowerNav.html"); ?>
    </div>

<!-- lowerNav.html -->
<div id="cD">
    <a href="contact.php"><img class="lowerNav" src="images/contact.gif" alt="contact" /></a>
</div>
<div id="pD">
    <a href="pedigrees.php"><img class="lowerNav" src="images/pedigrees.gif" alt="pedigrees" /></a>
</div>
<div id="mD">
    <a href="members.php"><img class="lowerNav" src="images/members.gif" alt="members" /></a>
</div>
Code:
img.lowerNav {
    float:left;
    }
#cD {
    float:right;
    width:90px;
    border: 1px solid green;
    margin:0px;
    padding:0px;
    }
#mD {
    float:right;
    border: 1px solid red;
    width:90px;
    margin:0px;
    padding:0px;
    }
#pD {
    float:right;
    border: 1px solid blue;
    width:90px;
    margin:0px;
    padding:0px;
    }
Help me please I will be very grateful!
soap is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-12-2007, 10:34 PM Re: Help please! Images and links, Float property.
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Put your bottom nav into an unordered list, then you can eliminate all the extraneous divs. You can put the image in the li and then add the link. Then style the UL, the LI and the <a>s.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 09-12-2007, 11:01 PM Re: Help please! Images and links, Float property.
Super Talker

Posts: 132
Trades: 0
Okay so I went to work on that, am running into more problems now. I have never run into a problem like this.

The red border is the ul
Blue borders are meant to be li's
and yellow are links

I can't see now why the images are not even inside the li's.

Code:
<ul class="lowerNav">
    <li>
        <a class="lowerNav" href="contact.php"><img src="images/contact.gif" alt="contact" /></a>
    </li>

    <li>
        <a class="lowerNav" href="pedigrees.php"><img src="images/pedigrees.gif" alt="pedigrees" /></a>
    </li>
    
    <li>
        <a class="lowerNav" href="members.php"><img src="images/members.gif" alt="members" /></a>
    </li>
</ul>
Code:
ul.lowerNav {
    float:right;
    width:698px;
    border: 2px solid red;
    padding:0;
    margin:0;
    list-style-type:none;
    }
li {
    display:inline;
    width:90px;
    height:auto;
    border: 1px solid blue;
    }
a.lowerNav {
    float:right;
    }
#lowerNav {
    width:698px;
    float:right;
    }
soap is offline
Reply With Quote
View Public Profile
 
Old 09-13-2007, 02:11 AM Re: Help please! Images and links, Float property.
vangogh's Avatar
Post Impressionist

Posts: 10,688
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
I'm not sure this will solve things, but a couple of things I notice is in the way you're using the class lowerNav. I think it only needs to be on the <ul> and not the <li>. If you need to refer to the list items and the link you can use

ul.lowerNav li {css here}
ul.lowerNav a {css here}

Your last style calls for an id of lowerNav, but you don't have an id="lowerNav" I assume you meant that to be a class.

Since I can't see the images I'm not really sure what the problem might be, but I have a hunch it might be because you're floating the links. That might be taking the links out of the normal document flow, but leaving the images in the document flow.

I do see the alt text inside the links.

You might try setting the float: right on the <li> instead of the <a>.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 09-13-2007, 05:23 PM Re: Help please! Images and links, Float property.
Super Talker

Posts: 132
Trades: 0
the lowerNav id is in a div that I didn't paste.
For some reason this thing just won't stick how I want it.
You can't see the images? "contact, members, our pedigrees"
soap is offline
Reply With Quote
View Public Profile
 
Old 09-13-2007, 08:49 PM Re: Help please! Images and links, Float property.
vangogh's Avatar
Post Impressionist

Posts: 10,688
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Sorry I missed where you pointed to the page in your original post. I was looking at things after building a page with the code you pasted here on my local machine so I didn't have the images.

I do see them on your site.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Reply     « Reply to Help please! Images and links, Float property.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16871 seconds with 12 queries