Log in

View Full Version : remove 'gap' at end of div



mastubbs
11-13-2008, 07:40 PM
Hi all,

sorry this is such a stupid question but i've tried and tried and i cant figure it out! How do you delete the 'gap' at the end of a div if there is one?


I am using lightbox for jquery and i if i try simply deleting the gap at the end it takes some of the info in the div with it from the HTML. I guess there must be a way to define the div size or margin in the CSS but i've tried a load of things and i cant figure it out!!

You can see what i mean here: http://cart3.jaspers-sensations.com/lingerie/daring/prod/indexlb.htm

CSS is here : http://cart3.jaspers-sensations.com/lingerie/daring/prod/css/xxx.css

Thanks!

Matt

Irishcash33
11-13-2008, 08:44 PM
I don't understand the "gap" I don't see it. I see a box that opens the lightbox when clicked. on a yellow bg. Why do you have the phrase "end of div"?
I don't see how the gap affects anything on the page...

mastubbs
11-13-2008, 09:10 PM
The gap is the space between the bottom of the image and the 'end of div' comment. If you copy the source HTML into a code editor and look in design view you will see the gap i mean. Playing with it in the design view i managed to remove the 'gap' beneath but then i got a gifferent 'gap' to the left :(

It doesnt effect anything on this page but i want to use this script in an auto-resizing iframe and the 'gap' underneath is leaving a large margin at the bottom of the iframe.

any other ideas?

Thanks

Matt

monicasaha
11-14-2008, 07:10 AM
at first you make all tags you have used in html, padding & margin 0..
then make img tag display block.. may this code


div, ul, li, img, a, p{
padding:0;
margin:0;
}
img{
border:none;
display:block;
}

hope this will help you

Snookerman
11-17-2008, 09:22 PM
This is better since you cover all tags:
* {
margin:0px;
padding:0px;
}