SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: page resolution

  1. #1
    SitePoint Addict
    Join Date
    Nov 2005
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    page resolution

    hi, I wanted to develop my page with a good resolution. My current settings is 1024x768. As I visit some web sites, I wonder how they manage in developing their web pages to have a better output. Let say for example, if i visit http://www.vtc.com/, it has this box container which is in the center page. If I reset it under 800x600 still it has a better display. Consider the code sample below:

    <html>
    <head>
    <style type="text/css">
    <!--
    #square
    {
    border-width: 1px;
    border-style: solid;
    border-color: #FF0000;
    width: 760;
    }
    -->
    </style>
    <title>This is sample page
    </title>
    </head>
    <body>
    <div id="square">
    I want this border to be on the center by not using the center tag.
    </div>
    </body>
    </html>

    Please help me.

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,118
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Hi,.

    Is this what you are looking for?
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <style type="text/css">
    <!--
    #square
    {
    	border: 1px solid #F00;
    	width: 760px;
    	margin: 0 auto;
    }
    -->
    </style>
    <title>This is sample page</title>
    </head>
    <body>
    <div id="square">
    I want this border to be on the center by not using the center tag.</div>
    </body>
    </html>
    Also, I recommend you make a global reset using the universal selector to eliminate all default margin/padding.
    Code:
    * { margin: 0; padding: 0; }
    Have a look through the FAQ's because this is a common question

  3. #3
    SitePoint Addict
    Join Date
    Nov 2005
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you so much. By the way how will I declare that this thread was solved.

  4. #4
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,118
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Thank you so much.
    will do Glad it worked out.


Bookmarks

Posting Permissions

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