The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Mysterious space problem
Blake B
post Jun 8 2008, 08:48 AM
Post #1





Group: Members
Posts: 4
Joined: 8-June 08
Member No.: 5,860



I was throwing together a quick layout when I ran into a problem with an image and the DIV it is a child of. The image insists on having space between it and the bottom of the parent DIV, even though Ive set both of their bottom margins and paddings to 0px. Is there a way to fix this?

The page in question. (Notice the image in the banner DIV. Line 11 in the source code)
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
NovaArgon
post Jun 8 2008, 09:07 AM
Post #2


Always Need To Learn A New Code
*****

Group: Members
Posts: 265
Joined: 10-June 07
From: South Carolina
Member No.: 3,057



Where do you want the image to be next to the word This?

This post has been edited by NovaArgon: Jun 8 2008, 09:08 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Blake B
post Jun 8 2008, 03:49 PM
Post #3





Group: Members
Posts: 4
Joined: 8-June 08
Member No.: 5,860



Sorry, I changed the image to a red box to make it more clear. I want the box to not have any space between it and the bottom of the DIV it is in (which I colored blue just now). I didnt try to open the page in any browser other than IE.

This post has been edited by Blake B: Jun 8 2008, 03:51 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jun 8 2008, 04:10 PM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Well, in gecko the red box isn't even in the blue box. It's in the green box. smile.gif

I'd get IE out of Quirks Mode first by using a suitable doctype.

http://hsivonen.iki.fi/doctype/
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Blake B
post Jun 8 2008, 04:49 PM
Post #5





Group: Members
Posts: 4
Joined: 8-June 08
Member No.: 5,860



I changed the doctype to strict, and now the whole page looks funky and I dont even see the red box! tongue.gif

I guess Ill have to fiddle around with the layout until it conforms. I wasnt even aware of these standards, oddly enough. (I knew they existed but didnt know how to enforce them)
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jun 8 2008, 04:54 PM
Post #6


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Yeah, I noticed it got worse when I tried it. But you are better off in the long run even if you will have to start over now.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Jun 9 2008, 02:05 AM
Post #7


Programming Fanatic
********

Group: Members
Posts: 5,146
Joined: 23-August 06
From: Europe
Member No.: 9



Well, you have margin:100px auto 0px 85px; (top right bottom left) set to the image, while the blue div has a height of 100px. Logically, the image will start where the div ends.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Blake B
post Jun 9 2008, 07:26 AM
Post #8





Group: Members
Posts: 4
Joined: 8-June 08
Member No.: 5,860



Yes, I had done that out of frustration to try and push the image against the border. It apparently didnt work. Even with the margin set correctly, the DIV still stretches slightly to allow the space between the bottom of the image and the border.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Jun 9 2008, 12:12 PM
Post #9


Programming Fanatic
********

Group: Members
Posts: 5,146
Joined: 23-August 06
From: Europe
Member No.: 9



Attached Image
This is what I see (Safari 3/Mac). Where do you want the red box to be?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jun 9 2008, 01:53 PM
Post #10


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



The whole page changed when a doctype was used, so he'll have to rething the whole style sheet.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 16th April 2024 - 12:44 AM