kiedis Posted February 3, 2013 Share Posted February 3, 2013 hello. i'm trying to make a basic layout by following steps provided in video tutorial. here's the code: html {background:yellow;}body { width:90%; background:brown; margin:0 auto;}header { height:50px; margin-bottom:1em;} Apparently, this code should allocate a header space on the top of the page but it simply does not happen. Also tried with .header class, but the result was the same. And here's HTML code: <!DOCTYPE html><html><head> <title>Test</title><link rel="stylesheet" type="text/css" href="style.css"> </head><body><p>Home Tickets Tours Biography Forum</p></body></html> Link to comment Share on other sites More sharing options...
jeffman Posted February 3, 2013 Share Posted February 3, 2013 CSS does not create elements. It applies style to an element, but only if the element exists in the HTML. <header>blah blah</header> Link to comment Share on other sites More sharing options...
kiedis Posted February 3, 2013 Author Share Posted February 3, 2013 forgot <header> tag in html. now it kind of works, thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now