Jump to content


Photo

block problems?


  • Please log in to reply
2 replies to this topic

#1 kalivos

kalivos
  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts
  • LocationCalifornia

Posted 19 July 2006 - 07:38 PM

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?

--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">


Thanks in advance!
Make a donation to phpfreaks. They need your help![br][br]

#2 nogray

nogray
  • Members
  • PipPipPip
  • Advanced Member
  • 930 posts
  • LocationSan Francisco CA

Posted 19 July 2006 - 07:52 PM

Your image should be first in the code
<li><img src="images/arrow-right.gif"><a href="#">test</a></li>

NoGray.com


#3 kalivos

kalivos
  • Members
  • PipPipPip
  • Advanced Member
  • 88 posts
  • LocationCalifornia

Posted 19 July 2006 - 10:04 PM

That worked. It's funny how you don't catch things like that after staring at the monitor for several hours. :)

Thank again
Make a donation to phpfreaks. They need your help![br][br]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users