Hey there! Sign in to join this conversationNew here? Join for free
    • Thread Starter
    Offline

    2
    ReputationRep:
    I want to eliminate unnecessary space between the areas but it doesn't work even if I set the padding and margins to 0
    css:
    Code:
    @charset "utf-8";
    /* CSS Document */
    h1, p
    {
    	font-family: Tahoma, Geneva, sans-serif;
    }
    h1
    {
    	font-size:24px;
    	font-style: bold;
    }
    p
    {
    	font-size: 14px;
    }
    #Header, #Banner, #Navigation
    {
    	font-family: Tahoma, Geneva, sans-serif;
    	width:1000px;
    	backxground-color:#000;
    	color:#fff;
    	margin:0px;
    	padding:0px;
    }
    #Header
    {
    	height:25px;
    }
    #Banner
    {
    	height:150px;
    }
    #Navigation
    {
    	height:50px;
    	font-size:24px;
    }
    #Content
    {
    	width:1000px;
    	background-color:#CCC;
    	margin:0px;
    	padding:0px;
    }
    html:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Home Page</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
    </head>
    <body><div id="Header">Header</div>
    <div id="Banner"><p>Banner, 1000 by 150, black background, white forecolor.</p></div>
    <div id="Navigation"><ul>
    <li><a href"#">Home</a></li>
    <li><a href"#">Gallery</a></li>
    <li><a href"#">Trips</a></li>
    <li><a href"#">Links</a></li></ul></div>
    <div id="Content">
    <p>Content with width of 1000 and background of #CCCCCC, paragraph at size 14 in Tahoma.</p>
    <h1>Heading in bold with a siz.e of 24 px, also in Tahoma.</h1>
    </body>
    </html>
    When I preview the html, there's space in between the areas, how do I get rid of them?
    • Thread Starter
    Offline

    2
    ReputationRep:
    Should I place everything in a wrapper, only the specifications I've been given say nothing about it. I'm not even sure if I should create menu items (its the holiday so I can't ask the teacher).
    I've only been given the specifications for;Header, banner, navigation menu, content area, regular text/paragraphs and Headings.
    • Thread Starter
    Offline

    2
    ReputationRep:
    I've managed to get rid of the space by adding solid borders of 1px width set to the same colour as the background to make it hidden, is that the only way?
    If the border is 0px it doesn't work.
 
 
 
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • Poll
    Would you like to hibernate through the winter months?
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

    Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

    Quick reply
    Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.