Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21
  1. #1
    Junior Member
    Join Date
    Jul 2005
    Posts
    11
    Member #
    10705
    I want my entire website to show up in the center of the screen and not the left side. What html tag do I use and where do I put it?

  2.  

  3. #2
    Junior Member
    Join Date
    Jul 2005
    Posts
    2
    Member #
    10714
    hi,
    i donīt know if it might be of any help, here i go anyways... am not sure about the HTML tag but if you are using CSS this is what i olace in the body of my CSS
    body {
    font:75% Arial, Helvetica, sans-serif;
    color:#333;
    background: #ffffff url(back.png) repeat-y top center;
    text-align:center; /* Positions all content in the center of the viewport */}
    this just an example but the background image is placed at the center of you website and so is the text. After that all you have to do is create containers where you want the text to appear all in CSS.

    if you want i can send you a CSS file so that you can play around with it and see how it works.

  4. #3
    Junior Member
    Join Date
    Jun 2005
    Posts
    19
    Member #
    10364
    For HTML tag, it's the <center></center> tags. As for CSS, the above-guy's suggestion doesn't work in anything other than IE, I'm told.

  5. #4
    Senior Member Stylise's Avatar
    Join Date
    Jul 2005
    Location
    Mount Martha, Australia
    Posts
    229
    Member #
    10679
    The CSS:

    HTML Code:
    .container { 
        margin: 0px auto 0px auto;
    }
    The HTML:

    HTML Code:
    <div class="container">
        <p>What you want centered goes between the div tags</p>
    </div>

  6. #5
    Junior Member
    Join Date
    Jun 2005
    Posts
    19
    Member #
    10364
    Huh? 0px auto 0px auto? You have to have it twice? Hm, maybe that's why I can't get it to work. I must try that.

  7. #6
    Senior Member Stylise's Avatar
    Join Date
    Jul 2005
    Location
    Mount Martha, Australia
    Posts
    229
    Member #
    10679
    margin: top right bottom left;

    so,

    margin: 0px auto 0px auto;


  8. #7
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Actually, margin: 0px auto will do the trick. A shorter version of the margin property can take margin: top-bottm right-left. This is one of the three versions; the above you mentioned, the one I mentioned, and margin: top-bottom-right-left, which sets it for all of them at once.

  9. #8
    Senior Member Stylise's Avatar
    Join Date
    Jul 2005
    Location
    Mount Martha, Australia
    Posts
    229
    Member #
    10679
    Oh? Wasn't aware that you could do margin: top-bottom right-left.

    Good tip!

  10. #9
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Yep. Insofar as I know, all properties that take top left bottom right (such as the border property) can also do the two other variants.

  11. #10
    Junior Member
    Join Date
    Jun 2005
    Posts
    19
    Member #
    10364
    Actually, I've never got that "margin: 0px auto" to work. Am I doing something wrong?

    Here's the CSS code

    div.float {float: left; border: 0px; margin: auto 0px; height: 60; width: 230}
    div.spacer {clear: both}

    The URL is located at http://www.starwing.co.uk/test/inter...wer_select.htm


Page 1 of 3 1 2 3 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:42 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com