treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Page-wrap help!

  • I know this is an odd title because if I'm honest I have very little understanding of what I'm doing. Basically I've no idea how to explain how I want the page to look other than to draw it.

    This is how I'd like the page to look

    This is the css as is


    Thanks so much in advance and apologies for my awful web design knowledge!
  • Can you also show the HTML or maybe even a link to the webpage? It would make helping you loads easier!
  • Ok will upload now
  • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
    <html xmlns="http://www.w3.org/1999/xhtml"&gt;
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Ishmael's Mother -</title>
    <link href="CSS/style.css" rel="stylesheet" type="text/css" />


    </head>
    <body>
    <body id="home">

    <div id="page-wrap">
    <ul id="nav">

    <li class="home"><a href="index.html" id="homenav">Home</a></li>
    <li class="shop"><a href="shop.html" id="shopnav"></a>
    <li class="contact"><a href="contact.html" id="contactnav">Contact Me</a></li>
    <li class="about me"><a href="about.html" id="aboutnav">About Me</a></li>
    <li class="photos"><a href="photos.html" id="photosnav">Photos</a></li>
    </ul>

    <div id="main-content">
    <div id="article-area">
    <h1>Welcome</h1>
    <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id convallis purus. </p>
    </div>

    </div>
    </body>
    </html>
  • Ok, you have some errors in your html/css.

    First, you have a body tag in your html 2 times, so remove the first one. Next, right after the <div id="page-wrap"> line, insert a div with a sidebar id, so: <div id="sidebar"></div>.
    Also, you have forgotten one closing <div> tag, so add that just before the <body> closing tag.

    Next, the css. Your #page-wrap width is just a bit too small to fit the sidebar and the content area. You can change it from 800 to 900px or whatever you want really of course. The #sidebar div, float it to the left instead of to the right, give it a height (or it won't show without content) and maybe add a background-color: #A06B65; or whatever color/image you like of course. That's pretty much it, you might wanna think of indenting your code somewhat better for easier reading.
  • Thanks Bob, really appreciate that :)

  • No problem - if you have any more questions feel free to ask me.