+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Some HTML Help Please?

  1. #1
    Kraze_T is offline x10 Lieutenant Kraze_T is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    355

    Some HTML Help Please?

    Hi, i have recently created a website and i have noticed the site is not centered how can i center the site for all screens? is there any code?

  2. #2
    Fahad Guest

    Re: Some HTML Help Please?

    Enclose the whole site within <center></center> tags.
    I have used this before, but never with a whole site!

  3. #3
    dotaloc is offline x10Hosting Member dotaloc is an unknown quantity at this point
    Join Date
    Feb 2008
    Posts
    22

    Re: Some HTML Help Please?

    i guess there are a few options according to what you are trying to accomplish.

    you may need to put everything in a centered div. if you are not familiar with divs, you should read up on them.

    the following link shows another way:

    http://bluerobot.com/web/css/center1.html

    link to your page and someone may can help further or more specifically.

  4. #4
    torrey is offline x10Hosting Member torrey is an unknown quantity at this point
    Join Date
    Feb 2008
    Location
    Chattanooga,TN
    Posts
    9

    Re: Some HTML Help Please?

    What are you trying to accomplish? A centered div will center everything but it will also center text and images which could change the way your site looks. Are you trying to get the content in the middle of the screen with margins on either side? YOu may be needing to set parameters in a table or CSS code for that

  5. #5
    nabil's Avatar
    nabil is offline x10Hosting Member nabil is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Mauritius
    Posts
    39

    Re: Some HTML Help Please?

    Hello,
    Use CSS properties to center your pages, it would be better

    ~Nabil
    "It's choice not chance that determines your destiny."

  6. #6
    Kraze_T is offline x10 Lieutenant Kraze_T is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    355

    Re: Some HTML Help Please?

    i want it so when someone goes on the website, no matter what size screen they have, the site is always centered.

    I hope that explains it better

  7. #7
    BorderLineSigs's Avatar
    BorderLineSigs is offline x10 Sophmore BorderLineSigs is an unknown quantity at this point
    Join Date
    Mar 2008
    Posts
    232

    Re: Some HTML Help Please?

    i would say do this <center><body>hsdlgjkhjdshglkdh(what ever the body is)</body></center> hope it helped ya
    Last edited by BorderLineSigs; 03-26-2008 at 03:02 PM.
    Nice Site Here
    Great site to vistit: http://gamez.exofire.net
    give rep+ if my post helped AT ALL or you will pay...LATE FEES:bash:

  8. #8
    Jake's Avatar
    Jake is offline Developer Jake is an unknown quantity at this point
    Join Date
    Apr 2005
    Location
    Winona, MN
    Posts
    2,084

    Re: Some HTML Help Please?

    do

    <div align="center"> content </div>

    I am not sure if it is "correct" html but it works and it is what dreamweaver automatically does if you use its centering button.

    edit: is there a link to what you want centered? so we can help you better?
    Last edited by Jake; 03-26-2008 at 08:49 PM.
    Jake Omann | Developer
    █ 888-X10-9668 - jake[@]x10hosting.com
    x10Hosting - Giving Away Hosting Since 2004
    Premium Hosting | VPS Services

  9. #9
    LHVWB's Avatar
    LHVWB is offline Lord Of The Keys LHVWB is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    Australia
    Posts
    1,308

    Re: Some HTML Help Please?

    Here is another example that uses css, and only centres a div not all the contents as well, examples of this include this forum itself, it centres the div with a background around it, but not the contents. It uses the margin css properties.

    HTML Code:
    <head>
    <style  type="text/css">
    .maindiv
    {
        margin-top: 0px;
        margin-right: auto;
        margin-left: auto;
    }
    </style>
    </head>
    <body>
        <div class="maindiv" style="width: 85%;">
            Here is the Uncentered Content within a centered div.
        </div>
    </body>

  10. #10
    Jake's Avatar
    Jake is offline Developer Jake is an unknown quantity at this point
    Join Date
    Apr 2005
    Location
    Winona, MN
    Posts
    2,084

    Re: Some HTML Help Please?

    u could also use

    margin: 0px auto;
    Jake Omann | Developer
    █ 888-X10-9668 - jake[@]x10hosting.com
    x10Hosting - Giving Away Hosting Since 2004
    Premium Hosting | VPS Services

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. A HTML + CSS Basic Tutorial
    By Zenax in forum Tutorials
    Replies: 14
    Last Post: 09-02-2011, 01:42 PM
  2. Hybrid's HTML Lessons
    By Hybrid in forum Tutorials
    Replies: 18
    Last Post: 11-28-2009, 02:12 PM
  3. [IPB] Contiguous Board Index
    By phenetic in forum Tutorials
    Replies: 5
    Last Post: 09-18-2005, 10:31 AM
  4. What is XML!
    By wizeman in forum Tutorials
    Replies: 6
    Last Post: 08-27-2005, 12:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers