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.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Jul 2009
    Posts
    12
    Member #
    19423
    Hi all,

    I'm currently learning CSS and web design in general and I cant seem to find any way of controlling the alignment of a table using CSS. the text-align tab as expected aligns the text to the centre of its cell within the table but when i try to align the table to the center of the page i find i have to use a <table align="center"> tag in the back end of the actual page rather than using the CSS..

    Is there a way of controlling this via CSS rather than doing it this way?

    Many thanks in advance.

  2.  

  3. #2
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Code:
    table
    {
        margin-left: auto;
        margin-right: auto;
    
        width: 500px; /* or whatever */
    }
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  4. #3
    Junior Member
    Join Date
    Jul 2009
    Posts
    12
    Member #
    19423
    Yep, that did it, thanks alot for your help.


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 03:17 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com