Trying to make template but nothing is showing up. Just clear background.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shapkaroski
    New Member
    • Sep 2012
    • 1

    Trying to make template but nothing is showing up. Just clear background.

    I'm trying to make template, but I stuck in place.
    The code below is what I did.My question is what is wrong :|
    The header has height,width even color.. :|

    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>example</title> <style type="text/css"
    www {width:500px}
    header {background-color:#6c0;width:500px;height:200px;margin-bottom:0;}
    menu {background-color:#9F6;height:400px;width:200px;float:left;}
    content {background-color:#FFFFFF;height400px;width:*px;float:left;}
    footer {background-color:#6c0;width:500px}
    </style> </head> <body> <div id="www"> <div id="header"><h1>gwegwes<h1></div> <div id="menu"><h2>hgewr<h2></div> <div id="content"><h2>dshgwe<h2></div> <div id="footer"><h2>dfrher</h2></div> </div> </body> </html>
    Last edited by gits; Oct 4 '12, 12:11 PM. Reason: added code tags
  • Dave0291
    New Member
    • Jan 2012
    • 33

    #2
    Hi there,

    You are not using a selector for your Id's.

    Id's: #idname
    classes: .classname

    try this,
    Code:
    #www {width:500px}
    #header {background-color:#6c0;width:500px;height:200px;margin-bottom:0;}
    #menu {background-color:#9F6;height:400px;width:200px;float:left;}
    #content {background-color:#FFFFFF;height400px;width:*px;float:left;}
    #footer {background-color:#6c0;width:500px}
    also, I would use different names for your Id's. Since the HTML page actually has header and footer elements. Just to avoid confusion.

    Hope this helps

    Comment

    Working...