Ultimate Web Site Drop Down Menu Forum

Ultimate Web Site Drop Down Menu Forum (http://www.udm4.com/forum/index.php)
-   CSS and HTML (http://www.udm4.com/forum/forumdisplay.php?f=8)
-   -   How do I position an image inside a div? (http://www.udm4.com/forum/showthread.php?t=588)

paulj 09-03-2007 03:51 PM

How do I position an image inside a div?
 
I am learning CSS and I want to insert an image inside a div used as a footer. I want the image to appear to the left of the div with say 10px left margin and 5px top and bottom. I also have a horizontal UL and a
inside the div which are set to the centre of. I want to keep the appearance as...

bcarl314 09-03-2007 04:30 PM

Say you have this:

Code:

<div id="footer">
<img id="left_img" src="/path/to/file.jpg" />
<ul>
 <li><a href="">Link</a></li>
</ul>
</div>

Then your CSS would look like this...

Code:

#footer img#left_img {
  float:left;
  margin:5px 0px 5px 10px; /*Top Right Bottom Left*/

}



All times are GMT. The time now is 04:55 PM.

Powered by vBulletin® Version 3.0.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.