...

View Full Version : Unaccounted space



wood1e2
09-15-2011, 10:55 AM
Hi,

I have been working on a site layout, but there appears (in all browsers) a gap between two divs, but why there is I don't know!!

It is driving me nuts! I know I have done something really simply stupid!!

There should not be a gap between header and strapline... They should butt up against each other..

http://www.synaxissolutions.co.uk/test/fin/test.html

Many thanks in advance

coothead
09-15-2011, 11:10 AM
Hi there wood1e2,

and a warm welcome to these forums. ;)

your unwanted space is the result of these two highlighted attributes...


#strapline {
width: 100%;
height: 190px;
margin: 0 auto;
background-image:url(images/strapline_bg.jpg);
}
#strapline_content {
width: 960px;
height: 190px;
margin: 0 auto;
}

wood1e2
09-15-2011, 11:20 AM
Hi

Many thanks :)

I have removed the highlighted lines but all that does is shrink the div Strapline to the high of the text 'Insert Something here'

Not move the div strapline to right up against the div header.

Any other ideas :) It is driving me mad!! lol

coothead
09-15-2011, 11:32 AM
Hi there wood1e2,

I am sorry that my suggestion did not suit your requirements, but I was not sure which space you wanted to remove. ;)

If it is the white space then that is the result of these highlighted attributes...


#header {
width: 100%;
height: 100px;
margin: 0 auto;
background-image:url(images/header_bg.jpg);
background-position: bottom;
}
#header_content {
width: 960px;
height: 100px;
margin: 0 auto;
}

coothead

wood1e2
09-15-2011, 01:18 PM
Hi,

The white space is absolutely fine, as is the space with the wording 'Insert Content here'

It is the space/gap between those two divs. there should be no gap

Cheers :)

coothead
09-15-2011, 01:33 PM
Hi there

Now that you have defined unwanted space, add the highlighted attribute here...


#strapline_content h1 {
margin:0;
text-align:center;
color: #FFFFFF;
}

...to remove the default margin that the h+ elements possess.

coothead

wood1e2
09-15-2011, 02:03 PM
Oh of course I completely forgot the margin in H1 !!!!

Many thanks for your help

coothead
09-15-2011, 06:12 PM
I just knew that, together, we would get the pesky little bugger. :D

wood1e2
09-15-2011, 08:18 PM
Can't see the wood for the trees sometimes :)

Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum