[SOLVED] Gaps between divs :-(

This is a discussion on "[SOLVED] Gaps between divs :-(" within the Web Page Design section. This forum, and the thread "[SOLVED] Gaps between divs :-( are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jan 22nd, 2008, 15:10
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 267
Thanks: 0
Thanked 0 Times in 0 Posts
[SOLVED] Gaps between divs :-(

hey guys, down the left of the page, im getting a gap between 2 of my divs in IE and i dont have a clue why. Its fine in FF

http://www.design365.co.uk/mindaid/home.htm
Reply With Quote

  #2 (permalink)  
Old Jan 22nd, 2008, 15:16
SuperMember

SuperMember
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gaps between divs :-(

its ok in ie7
Reply With Quote
  #3 (permalink)  
Old Jan 22nd, 2008, 15:43
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 267
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gaps between divs :-(

its wrong in ie6, you should see just above the 'stop smoking' area theres a gap between the top of the box and where the stop smoking box starts
Reply With Quote
  #4 (permalink)  
Old Jan 22nd, 2008, 15:53
Aso's Avatar
Aso Aso is offline
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,010
Blog Entries: 2
Thanks: 5
Thanked 23 Times in 20 Posts
Send a message via Skype™ to Aso
Re: Gaps between divs :-(

It's a known trait of IE6 to interpret line carriages in HTML as line breaks. Try putting
Code: Select all
<div id="stopsmoking">
<div id="smoking_txt">
<span class="leftlinks"><a href="#">Stop Smoking</a></span>
</div>
</div>
on one line.

Nice to see valid HTML by the way
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Reply With Quote
  #5 (permalink)  
Old Jan 23rd, 2008, 08:11
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 267
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gaps between divs :-(

hi aso, i tried that, it didnt work. Any other suggestions?
Reply With Quote
  #6 (permalink)  
Old Jan 23rd, 2008, 08:48
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 267
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gaps between divs :-(

Hey, i now have an easier link for you to look at, i just cant get rid of that gap....its IE6 im getting the gaps

http://www.design365.co.uk/mindaid/test.htm

HTML:

Code: Select all
<div id="shadow_top"></div><div id="stopsmoking"></div>
CSS:

Code: Select all
#shadow_top{
width: 265px;
height: 14px;
background-image: url(images/shadow_top.gif);
background-repeat: no-repeat;
}

#stopsmoking{
width: 265px;
height: 55px;
background-image: url(images/stopsmoking.gif);
background-repeat: no-repeat;
text-align: right;
}
Reply With Quote
  #7 (permalink)  
Old Jan 23rd, 2008, 12:43
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,620
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: Gaps between divs :-(

I haven't look at your page but I'm pretty sure it's the old clear:both bug in IE6. DAMN Microsoft.
Try adding this to you css: (both divs)
clear:both;

If not, then it may well be because of your height parameters. Double check them...
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #8 (permalink)  
Old Jan 23rd, 2008, 14:22
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 267
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gaps between divs :-(

Ive done that, it still doesnt work

Theres no error in my height parameters either, they are all exactly the same size as the images.
Reply With Quote
  #9 (permalink)  
Old Jan 23rd, 2008, 15:03
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,620
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: Gaps between divs :-(

ok, add this to your css:
#stopsmoking, #shadow_top{ display: block; padding:0; margin:0; float:left; clear:both; }
one of those should fix it...
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #10 (permalink)  
Old Jan 23rd, 2008, 15:23
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 267
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gaps between divs :-(

nope lol
Reply With Quote
  #11 (permalink)  
Old Jan 23rd, 2008, 15:30
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 267
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gaps between divs :-(

I find it very confusing how theres a gap, because all the rest are seperate images as well (weight loss, sexual issues, products) yet there isnt a gap between them. Im so confused and annoyed!
Reply With Quote
  #12 (permalink)  
Old Jan 23rd, 2008, 20:11
Aso's Avatar
Aso Aso is offline
Chief Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,010
Blog Entries: 2
Thanks: 5
Thanked 23 Times in 20 Posts
Send a message via Skype™ to Aso
Re: Gaps between divs :-(

Got it! Slap
Code: Select all
&nbsp;
in each of those divs and see what you get.

EDIT: And add this to your CSS

Code: Select all
#shadow_top {
line-height: 14px;
}
#stopsmoking {
line-height: 55px;
}
That should fix it
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)

Last edited by Aso; Jan 23rd, 2008 at 20:49.
Reply With Quote
  #13 (permalink)  
Old Jan 24th, 2008, 08:16
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 267
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gaps between divs :-(

aso186 i could kiss you!
Reply With Quote
  #14 (permalink)  
Old Jan 24th, 2008, 10:14
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,620
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: [SOLVED] Gaps between divs :-(

LINE HEIGHT... Oh yes...
Well done!
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how to put divs next to each other lostboys Web Page Design 9 Jan 13th, 2008 20:47
[SOLVED] Im getting a gap between 2 divs :-( danny322 Web Page Design 1 Jan 9th, 2008 08:46
[SOLVED] overlapping divs :-( danny322 Web Page Design 7 Dec 18th, 2007 12:58
gaps in layout jtyoungs Web Page Design 11 Oct 8th, 2007 15:41
[SOLVED] DIVs and Firefox - help! Emzi Web Page Design 4 Oct 4th, 2007 10:42


All times are GMT. The time now is 22:11.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43