float problems

K

King of Red Lions

I have a div with a title and an image in it, the image floats right of the
title. This all works fine but I can't get the image to sit right against
the bottom of the div, how can I do this? Many thanks in advance!
 
E

Els

King said:
I have a div with a title and an image in it, the image
floats right of the title. This all works fine but I
can't get the image to sit right against the bottom of the
div, how can I do this? Many thanks in advance!

As you didn't give a url, I can only guess, so here goes:
add img{display:block;} to your stylesheet.
If that doesn't do the trick, write
*{padding:0;margin:0;border:1px solid red;} on the top of your
stylesheet. The red border shows you the outline of every
element, which may give you a clue as to where the gap is coming
from, while padding and margin set to 0 might get rid of the gap
right way, after which it's your job to slowly start adding
margins and paddings where you want them, without making the gap
re-appear.
 
B

bulge

As you didn't give a url, I can only guess, so here goes:
add img{display:block;} to your stylesheet.
If that doesn't do the trick, write
*{padding:0;margin:0;border:1px solid red;} on the top of your
stylesheet. The red border shows you the outline of every
element, which may give you a clue as to where the gap is coming
from, while padding and margin set to 0 might get rid of the gap
right way, after which it's your job to slowly start adding
margins and paddings where you want them, without making the gap
re-appear.


great tip!
I'm assuming the * in:
*{padding:0, etc)
....means to apply it to everything?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top