Need Help Coding Site for all monitor sizes in Dreamweaver

Discussion in 'HTML & Website Design' started by Enmar, Jun 17, 2008.

  1. #1
    I've recently started a new site and built the homepage in Dreamweaver. Its a quick one, just a paragraph pretty much. The problem is, I centered the paragraph, which is in a <div>, and its in the center of it. It shows up fine on my resolution, but not so good to others. Should I put the paragraph into a table cell instead, and build the page with tables? or is there a way to make sure it shows up the same on all the monitor sizes? I'm no expert in HTML/DW, but I do know the basics and maybe a little more.

    To explain more, when I set the div at my resolution its set with absolute positioning (Top, Left, Width, Height) and looks perfect. When I have my friend view the page on his widescreen, the text is way off obviously. I may have learned how to position relative to the screen size in the past but I most certainly have forgotten.

    How do most of you code? What resolution/what structure?

    Thanks for the help.

    Edit: I'm afk sleeping, but will look at this thread around 12:30PM EST tomorrow.
     
    Enmar, Jun 17, 2008 IP
  2. itcn

    itcn Well-Known Member

    Messages:
    795
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    118
    #2
    You can use a fixed-width design. Create an outer div which contains all the content in your page, and set it to either target 800 width or 1024 width screen resolutions.

    For example:

    #container {
    width: 766px;
    margin: 0 auto;
    background-color: #ffffff;
    text-align: center;
    }

    <div id="center">
    your page content here ...
    </div>
     
    itcn, Jun 17, 2008 IP
  3. Enmar

    Enmar Active Member

    Messages:
    177
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Alright, I've set up the container. Right now I have the container, and then inside of it is a table that contains my header image at the top. When I try to make <div> for the content, it still finds the distance from the left of the page, even though its inside the <div id="container">

    Are you saying I should do this?

    <div id="container">
    <div align="center">
    Content Here
    </div>
    </div>

    Would this make the text I wrote appear in the middle of the container?

    here's what the page looks like now in the container, and what I need:

    http://i28.tinypic.com/24cw128.png
     
    Enmar, Jun 18, 2008 IP
  4. Enmar

    Enmar Active Member

    Messages:
    177
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #4
    Looks like I'm all set. I positioned the div where I wanted to, then used margins to center it. Works on all resolutions. Thank you for the help.
     
    Enmar, Jun 18, 2008 IP
  5. itcn

    itcn Well-Known Member

    Messages:
    795
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    118
    #5
    Sorry I didn't reply sooner, but glad it worked out for ya!
     
    itcn, Jun 18, 2008 IP