div spacing

This is a discussion on "div spacing" within the Web Page Design section. This forum, and the thread "div spacing 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 Sep 6th, 2006, 09:19
Junior Member
Join Date: Aug 2006
Location: Manchester
Age: 26
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
div spacing

OK, im trying to make the jump to full CSS and using DIVs rather than tables and its driving me crazy!!

Im trying have an image at the top of the page, nothing technical, really easy... then under the image i want my navigation... but it keeps putting a space between the divs!!!

url is http://www.2percentinspiration.com/...e_v1/index.html

can anyone please tell me why this might be doing this, i feel stupid cos i know its soooo easy

thanks
John
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 Sep 6th, 2006, 09:52
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: div spacing

The image isn't loading... And why are you using frames?
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 Sep 6th, 2006, 09:53
minute44's Avatar
Most Reputable Member

SuperMember
Join Date: Apr 2006
Location: Nottingham UK
Age: 25
Posts: 1,351
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Re: div spacing

Space between divs would suggest a surplus margin on one or more divs.

Check and double check all your margins and padding to avoid this problem.
Last Blog Entry: Annoying people.... (Jan 16th, 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
  #4  
Old Sep 6th, 2006, 10:00
Junior Member
Join Date: Aug 2006
Location: Manchester
Age: 26
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: div spacing

i havent set any margins... maybe thats the problem ;-) didnt realise you had to specify them
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 Sep 6th, 2006, 10:04
minute44's Avatar
Most Reputable Member

SuperMember
Join Date: Apr 2006
Location: Nottingham UK
Age: 25
Posts: 1,351
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Re: div spacing

Yes.. if you don't specify them then browsers will use the default setting... this is different from browser to browser so it is always best to set them.
Last Blog Entry: Annoying people.... (Jan 16th, 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
  #6  
Old Sep 6th, 2006, 10:23
Junior Member
Join Date: Aug 2006
Location: Manchester
Age: 26
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: div spacing

ok i have set margin:0px; padding: 0px; on all DIVs but the problem is still there???

any other ideas?

thanks
J
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 Sep 6th, 2006, 10:25
minute44's Avatar
Most Reputable Member

SuperMember
Join Date: Apr 2006
Location: Nottingham UK
Age: 25
Posts: 1,351
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Re: div spacing

Do any of the items inside your divs have default margins? It could be those that are causing your problems
Last Blog Entry: Annoying people.... (Jan 16th, 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 Sep 6th, 2006, 10:41
Junior Member
Join Date: Aug 2006
Location: Manchester
Age: 26
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: div spacing

This is my HTML code:

<div id="main" align="center">
<div id="container">
<div id="topbanner"><img src="images/lifestyle_banner.jpg" width="793" height="87" alt="Lifestyle Arts and Crafts Ltd" border="0" /> </div>

<div id="leftnav"><img src="images/nav_left_spacer.jpg" width="190" height="16" alt="" border="0" /></div>
<div id="navigation">&nbsp;</div>

<div id="leftnav" align="left"><!-- Begin Left Nav -->
leftnav
</div><!-- End Left Nav -->

<div id="maincontent" align="left"><!-- Begin Main content -->
main content
</div><!-- End Main content -->
</div>
</div>

and this is my CSS:

body {margin: 0px; padding: 0px; }
div {margin: 0px 0px 0px 0px; }
/* DIV Styles */
#main { width: 100%; margin:0px; padding: 0px; }
#container { width:793px; margin:0px; padding: 0px; }
#topbanner { width:793px; height:87px; margin: 0px; padding: 0px; }
#maincontent { width: 603px; float:left; margin:0px; padding: 0px; }
#leftnav { width: 190px; float: left; margin:0px; padding: 0px; }
#navigation { width: 603px; float:left; background-color: #BBC57D; height: 16px; margin:0px; padding: 0px; }
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 Sep 6th, 2006, 10:43
minute44's Avatar
Most Reputable Member

SuperMember
Join Date: Apr 2006
Location: Nottingham UK
Age: 25
Posts: 1,351
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Re: div spacing

Umm, dude... why are you specifying styles in your HTML AND your CSS? keep ALL style information in the CSS for starters...
Last Blog Entry: Annoying people.... (Jan 16th, 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 Sep 6th, 2006, 10:44
Junior Member
Join Date: Aug 2006
Location: Manchester
Age: 26
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: div spacing

Quote:
Originally Posted by ryanfait View Post
The image isn't loading... And why are you using frames?

Im not using frames... the img should load now
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 Sep 6th, 2006, 10:46
Junior Member
Join Date: Aug 2006
Location: Manchester
Age: 26
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: div spacing

Quote:
Originally Posted by minute44 View Post
Umm, dude... why are you specifying styles in your HTML AND your CSS? keep ALL style information in the CSS for starters...
Im only using align arent i? i have removed that and it all aligns left... but the problem still there:

http://www.2percentinspiration.com/l..._v1/index.html

im wanting it to look like this:
http://www.2percentinspiration.com/l.../index-tb.html
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 Sep 6th, 2006, 11:08
minute44's Avatar
Most Reputable Member

SuperMember
Join Date: Apr 2006
Location: Nottingham UK
Age: 25
Posts: 1,351
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Re: div spacing

You do realise you only have a problem in IE right??

In firefox it looks fine.

I maintain it's a margin issue.
Last Blog Entry: Annoying people.... (Jan 16th, 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
  #13  
Old Sep 6th, 2006, 11:42
Junior Member
Join Date: Aug 2006
Location: Manchester
Age: 26
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: div spacing

so how can i fix it? - didnt check in firefox to be honest
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 Sep 6th, 2006, 12:06
minute44's Avatar
Most Reputable Member

SuperMember
Join Date: Apr 2006
Location: Nottingham UK
Age: 25
Posts: 1,351
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Re: div spacing

Build the page up again from the beginning. Check in browser after each and every change to see when the problem occurs. THat should pinpoint the offending object. Then look at the CSS for that object and you should see your problem.
Last Blog Entry: Annoying people.... (Jan 16th, 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

Tags
div, spacing

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
Css Spacing Help! RZX Developer Web Page Design 5 Aug 13th, 2007 12:26
Help needed with Spacing hbb Web Page Design 9 Jun 12th, 2007 16:22
Spacing paragraphs polkadot Starting Out 3 May 25th, 2007 12:48
Image Spacing! Help! djcee Web Page Design 6 Aug 9th, 2006 11:59
spacing around images AdRock Web Page Design 4 Aug 2nd, 2006 21:32


All times are GMT. The time now is 21:33.


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