Go Back   Ultimate Web Site Drop Down Menu Forum > Web Development > CSS and HTML
Register FAQ Members List Calendar Today's Posts

Reply
Thread Tools Display Modes
Unread 09-03-2007, 03:51 PM
paulj paulj is offline
Senior Member
Join Date: Jul 2007
Posts: 521
  #1  
Default 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...
Reply With Quote
Unread 09-03-2007, 04:30 PM
bcarl314 bcarl314 is offline
Senior Member
Join Date: Aug 2007
Posts: 141
  #2  
Default

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*/

}
Reply With Quote
Reply



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 10:12 PM.


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