Confining design

Discussion in 'Web Design and Development' started by moea, Mar 7, 2008.

  1. moea macrumors newbie

    Joined:
    Jan 28, 2006
    #1
    I've been told "there are no dumb questions", but here i go. When I Open a new html page with Dreamweaver, my window can drag to approx. 1650 x 950. I want to confine my design to around 800 px wide. I would like to center my design for anyones browser window, but it seems to me my design goes into infinity, especially in regard to width. Even if insert code to indicate i want my page centered; how does it interpret this? Is the someway for me to determine the boundaries of my design?

    I've been given all sort of advise for centering, and don't really know what to do. Do I need to Insert > Tag? If that's the case, what tag do i choose; body, div, or what.

    ....and after that, what do I enter?

    Thanks
     
  2. HaGG macrumors member

    Joined:
    Jun 2, 2007
    #2
    Are you on about something like this?

    CSS

    Code:
    #content {
    	width: 800px;
    	margin: 0px auto 0px auto;
    	}
    In Page Code

    Code:
    <div id="content">
    
    <h1>Hello World</h1>
    
    </div>
     
  3. ChicoWeb macrumors 65816

    ChicoWeb

    Joined:
    Aug 16, 2004
    Location:
    California
    #3
    But don't forget, if you actually do this, you'll have scrolling on 8x6. You'll need to do like 760.
     
  4. moea thread starter macrumors newbie

    Joined:
    Jan 28, 2006
    #4
    Help

    Chico:
    how do I enter that info into my code: an/or CSS and page code. I'm really new to this. Should I try and condense my design down to 760? The area of design I now have is about 900 px wide. i don't want any scrolling.

    if you would like to check out what I have, you could go to ...oakmontelks.com

    Any assistance would be appreciated.

    Thank you
     
  5. HaGG macrumors member

    Joined:
    Jun 2, 2007
    #5
    You can change the width, just change the 800px to 760px,

    Here is an example page to get you started

    Code:
    <!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=iso-8859-1" />
    <title>Hello World</title>
    
    [COLOR="Red"]<style>[/COLOR]
    [COLOR="DarkRed"]
    #content {
    	width: 780px;
    	margin: 0px auto 0px auto;
    	}
    [/COLOR]
    [COLOR="Red"]</style>[/COLOR]
    
    </head>
    
    <body>
    
    [COLOR="Red"]<div id="content">[/COLOR]
    
    [COLOR="DarkRed"]<h1>Hello World</h1>[/COLOR]
    
    [COLOR="Red"]</div>[/COLOR]
    
    </body>
    </html>
     
  6. digitalField macrumors regular

    Joined:
    May 21, 2004
    Location:
    portland
    #6
    Page alignment.. Page width.. Styling.. these are some of the basics when it comes to coding up your html page. Since it would appear that you are still trying to get a handle on these basics i would actually suggest checking out this site as they offer a pretty fantastic walkthru. Explaining the differences between tags.. how to use them. where they go. ect..


    http://w3schools.com/html/html_intro.asp


    just keep reading and click on the 'next' button.


    M!
     

Share This Page