[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.


 Subscribe in a reader

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

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jan 22nd, 2008, 15:10
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 266
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jan 22nd, 2008, 15:16
Reputable Member
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gaps between divs :-(

its ok in ie7
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jan 22nd, 2008, 15:43
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 266
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Jan 22nd, 2008, 15:53
Aso's Avatar
Aso Aso is offline
Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,341
Blog Entries: 2
Thanks: 11
Thanked 49 Times in 46 Posts
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Jan 23rd, 2008, 08:11
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 266
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gaps between divs :-(

hi aso, i tried that, it didnt work. Any other suggestions?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Jan 23rd, 2008, 08:48
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 266
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;
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Jan 23rd, 2008, 12:43
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,669
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Jan 23rd, 2008, 14:22
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 266
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Jan 23rd, 2008, 15:03
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,669
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Jan 23rd, 2008, 15:23
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 266
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gaps between divs :-(

nope lol
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old Jan 23rd, 2008, 15:30
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 266
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old Jan 23rd, 2008, 20:11
Aso's Avatar
Aso Aso is offline
Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,341
Blog Entries: 2
Thanks: 11
Thanked 49 Times in 46 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old Jan 24th, 2008, 08:16
Reputable Member
Join Date: Oct 2007
Location: UK
Posts: 266
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gaps between divs :-(

aso186 i could kiss you!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14  
Old Jan 24th, 2008, 10:14
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,669
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
Re: [SOLVED] Gaps between divs :-(

LINE HEIGHT... Oh yes...
Well done!
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
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:48.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization 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