Jump to content

Archived

This topic is now archived and is closed to further replies.

kalivos

block problems?

Recommended Posts

Hi, I'm new to CSS so forgive me if this is a REALLY stupid question.

I'm trying to make a drop down menu (Which is working so far). I'm trying to add an image to the right of some of the links. I found that the image is pushed to the next line. This is for both IE and FF. 1) What's causing the image to be pushed down. 2) What action should I take to fix it?

[code]
--CSS--
#nav a {
display: block;
width: 10em;
}

#nav img {

float:right;
}

--HTML--
<ul id="nav">
<li><a href="#">test</a><img src="images/arrow-right.gif">
[/code]


Thanks in advance!

Share this post


Link to post
Share on other sites
Your image should be first in the code
[code]
<li><img src="images/arrow-right.gif"><a href="#">test</a></li>
[/code]

Share this post


Link to post
Share on other sites
That worked. It's funny how you don't catch things like that after staring at the monitor for several hours. :)

Thank again

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.