By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,700 Members | 1,441 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,700 IT Pros & Developers. It's quick & easy.

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

P: 1
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.. :|

Expand|Select|Wrap|Line Numbers
  1. <!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"
  2. www {width:500px}
  3. header {background-color:#6c0;width:500px;height:200px;margin-bottom:0;}
  4. menu {background-color:#9F6;height:400px;width:200px;float:left;}
  5. content {background-color:#FFFFFF;height400px;width:*px;float:left;}
  6. footer {background-color:#6c0;width:500px}
  7. </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>
Sep 29 '12 #1
Share this Question
Share on Google+
1 Reply


P: 33
Hi there,

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

Id's: #idname
classes: .classname

try this,
Expand|Select|Wrap|Line Numbers
  1. #www {width:500px}
  2. #header {background-color:#6c0;width:500px;height:200px;margin-bottom:0;}
  3. #menu {background-color:#9F6;height:400px;width:200px;float:left;}
  4. #content {background-color:#FFFFFF;height400px;width:*px;float:left;}
  5. #footer {background-color:#6c0;width:500px}
  6.  
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
Oct 23 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.