Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-15-2011, 09:55 AM   PM User | #1
wood1e2
New to the CF scene

 
Join Date: Sep 2011
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
wood1e2 is an unknown quantity at this point
Unaccounted space

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
wood1e2 is offline   Reply With Quote
Old 09-15-2011, 10:10 AM   PM User | #2
coothead
Senior Coder

 
coothead's Avatar
 
Join Date: Jan 2004
Location: chertsey, a small town 25 miles south west of london, england.
Posts: 1,555
Thanks: 0
Thanked 196 Times in 192 Posts
coothead will become famous soon enough
Hi there wood1e2,

and a warm welcome to these forums.

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

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

Last edited by coothead; 09-15-2011 at 10:12 AM..
coothead is offline   Reply With Quote
Old 09-15-2011, 10:20 AM   PM User | #3
wood1e2
New to the CF scene

 
Join Date: Sep 2011
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
wood1e2 is an unknown quantity at this point
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
wood1e2 is offline   Reply With Quote
Old 09-15-2011, 10:32 AM   PM User | #4
coothead
Senior Coder

 
coothead's Avatar
 
Join Date: Jan 2004
Location: chertsey, a small town 25 miles south west of london, england.
Posts: 1,555
Thanks: 0
Thanked 196 Times in 192 Posts
coothead will become famous soon enough
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...
Code:

#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
coothead is offline   Reply With Quote
Old 09-15-2011, 12:18 PM   PM User | #5
wood1e2
New to the CF scene

 
Join Date: Sep 2011
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
wood1e2 is an unknown quantity at this point
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
wood1e2 is offline   Reply With Quote
Old 09-15-2011, 12:33 PM   PM User | #6
coothead
Senior Coder

 
coothead's Avatar
 
Join Date: Jan 2004
Location: chertsey, a small town 25 miles south west of london, england.
Posts: 1,555
Thanks: 0
Thanked 196 Times in 192 Posts
coothead will become famous soon enough
Hi there

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

#strapline_content h1 {
   margin:0;
   text-align:center;
   color: #FFFFFF;
}
...to remove the default margin that the h+ elements possess.

coothead
coothead is offline   Reply With Quote
Old 09-15-2011, 01:03 PM   PM User | #7
wood1e2
New to the CF scene

 
Join Date: Sep 2011
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
wood1e2 is an unknown quantity at this point
Oh of course I completely forgot the margin in H1 !!!!

Many thanks for your help
wood1e2 is offline   Reply With Quote
Old 09-15-2011, 05:12 PM   PM User | #8
coothead
Senior Coder

 
coothead's Avatar
 
Join Date: Jan 2004
Location: chertsey, a small town 25 miles south west of london, england.
Posts: 1,555
Thanks: 0
Thanked 196 Times in 192 Posts
coothead will become famous soon enough
I just knew that, together, we would get the pesky little bugger.
coothead is offline   Reply With Quote
Old 09-15-2011, 07:18 PM   PM User | #9
wood1e2
New to the CF scene

 
Join Date: Sep 2011
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
wood1e2 is an unknown quantity at this point
Can't see the wood for the trees sometimes

Thanks
wood1e2 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:26 PM.


Advertisement
Log in to turn off these ads.