www.webdeveloper.com
Results 1 to 3 of 3

Thread: layout help :)

  1. #1
    Join Date
    Jun 2005
    Posts
    1

    layout help :)

    hello,

    Im a little bit new at this but i was wondering if anyone knows how to get a website with a layout that consist of a header image, footer image and the middle section which is the body which can be shorter or longer according to how much content is in it. The difficult part is how to also center it.

    Thank you for any tips

  2. #2
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,972
    Start with this. It'll react to screen size for width and amount of content for lenth.
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
      <head>
        <title>
          centered page
        </title>
    <style type="text/css">
    body{
    text-align: center;
    color: #000;
    background-color: #ccc;
    }
    div#container{
    margin: auto;
    border: 1px solid #000;
    width: 50%;
    text-align: left;
    background-color: #fff;
    }
    h1{
    text-align: center;
    font-family: monospace;
    padding: 7px;
    margin: 0;
    }
    div#footer, div#content{
    border-top: 1px solid #000;
    padding: 7px;
    margin: 0;
    }
    div#footer{font-size: 0.7em;}
    h2{ font-family: monospace; } 
    </style>
      </head>
      <body>
        <div id="container">
          <h1>
            A very simple page
          </h1>
          <div id="content">
            <h2>
              A short intro
            </h2>
            <p>
              This page is ever so simple.
            </p>
            <p>
              Simple is good
            </p>
            <h2>
              Fake latin
            </h2>
            <p>
              Lorem ipsum dolor sit amet, consectetuer adipiscing
              elit. Nam condimentum blandit nulla. Fusce placerat
              dolor et ipsum. Cras feugiat libero et metus. Nulla
              facilisi. Sed tortor augue, fermentum ut, viverra eu,
              sollicitudin vitae, enim. Pellentesque habitant morbi
              tristique senectus et netus et malesuada fames ac
              turpis egestas. Curabitur dictum metus in tellus. Cras
              velit nisl, elementum eu, lobortis eget, elementum nec,
              nisl. Ut ac purus eget lorem facilisis iaculis. Donec
              vel nunc quis risus bibendum accumsan. Curabitur
              hendrerit porta massa. Nunc suscipit. Maecenas mollis
              pulvinar mauris.
            </p>
          </div>
          <div id="footer">
            <p>
              Copyright info and such like.
            </p>
          </div>
        </div>
      </body>
    </html>
    Last edited by the tree; 06-11-2005 at 07:13 AM. Reason: better organising
    Disclaimer. (1) Whilst I will help you sometimes, if I feel like it, and my advice in relation to your actual question will be of good quality: my posts are to be taken with a pinch of salt. I will be sarcastic, deploy irony and include obscure cultural references for my own amusement without warning.
    (2) You will gain nothing from complaining, and if you try to argue with me then you will not win. No matter how noble your battle seems, I am still better than you, don't be an hero.

  3. #3
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,972
    Quote Originally Posted by simplejohn
    I think that before u decide to build your sitethat way, you should think from the viewer side.
    People use different resolutions, and when the open your website,
    it should have some basic ground borders, otherwise your website will get out of proportion,
    I'm pretty sure my layout fits with different resolutions quite neatly, although if it's for a comercial purpose you'd proably want a handheld layout as well.
    Disclaimer. (1) Whilst I will help you sometimes, if I feel like it, and my advice in relation to your actual question will be of good quality: my posts are to be taken with a pinch of salt. I will be sarcastic, deploy irony and include obscure cultural references for my own amusement without warning.
    (2) You will gain nothing from complaining, and if you try to argue with me then you will not win. No matter how noble your battle seems, I am still better than you, don't be an hero.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles