Gap Between to div tag-PLEASE HELP

This is a discussion on "Gap Between to div tag-PLEASE HELP" within the Web Page Design section. This forum, and the thread "Gap Between to div tag-PLEASE HELP 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 Jul 12th, 2007, 14:05
New Member
Join Date: Jul 2007
Location: Coventry
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Question Gap Between to div tag-PLEASE HELP

I have finally started to play with css as apposed to tables in html but I cannot figure out why when i have one box under another formed by div tags there is a gap.

can anyone help please? i have included the html and css code below

Code: Select all
 <html>
  <head>
  </head>
  <body>
   <div id="top">
    Top Box
   </div>
   <div id="bottom">
    Bottom Box
    </div>
  </body>
 </html>


Code: Select all
#top{
background-color:yellow;
margin:0px;
padding;0px;
}
#bottom{
margin:0px;
padding:0px;
background-color:green;
}
Reply With Quote

  #2 (permalink)  
Old Jul 12th, 2007, 14:10
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gap Between to div tag-PLEASE HELP

Let's play "Spot the error"
Code: Select all
#top{
background-color:yellow;
margin:0px;
padding;0px;
}
also ... you don't need to add units to 0 values. 0 is 0 in everything
Reply With Quote
  #3 (permalink)  
Old Jul 12th, 2007, 14:21
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gap Between to div tag-PLEASE HELP

Oooo.... I see it!!

Change the semi colon to colon!
padding: 0

What do I win?
Reply With Quote
  #4 (permalink)  
Old Jul 12th, 2007, 14:31
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gap Between to div tag-PLEASE HELP

Here ... have an

:rofl:
Reply With Quote
  #5 (permalink)  
Old Jul 12th, 2007, 19:31
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gap Between to div tag-PLEASE HELP

Oh yippee!!!
Reply With Quote
  #6 (permalink)  
Old Jul 12th, 2007, 19:41
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,649
Thanks: 0
Thanked 7 Times in 7 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Gap Between to div tag-PLEASE HELP

:nep:
__________________
I've got <style> and .class
Reply With Quote
  #7 (permalink)  
Old Jul 12th, 2007, 23:41
Up'n'Coming Member
Join Date: Jul 2007
Location: France
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gap Between to div tag-PLEASE HELP

HI, Philiph - Learning how to validate your own code is extremely useful and can save a lot of angst. Here is a link for validating your CSS (and HTML):
http://jigsaw.w3.org/css-validator/
This will likely give you an instant result with errors in your coding. It's basically professional self-help.

Hope that helps.
Reply With Quote
  #8 (permalink)  
Old Jul 12th, 2007, 23:57
SuperMember

SuperMember
Join Date: May 2006
Location: North West, UK
Age: 21
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gap Between to div tag-PLEASE HELP

Linda, are you a squirrel. If you are then I'm afraid we're going to have a falling out.

Pete.
Reply With Quote
  #9 (permalink)  
Old Jul 13th, 2007, 12:36
SuperMember

SuperMember
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Gap Between to div tag-PLEASE HELP

No Pete.. I'm not a squirrel. I just like gifts of any kind!
Reply With Quote
Reply

Tags
css div tags

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


All times are GMT. The time now is 13:38.


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