align table to the left

edited April 2008 in
Without an empornium account this link won't work...
... but I don't think you need to see the page to answer my question.

The tables I want to change are like this

<table align="center"...>
I can't figure out the css I need to align tables to the left.

This doesn't work

center { text-align:left !important; } table { text-align:left !important; }
I've used adblock plus to strip away what's on the left. If I use Firebug and edit the html to remove align="center" - the tables move to the left.


  • edited April 2008
    table[height="56"][width="646"] {
    float: left !important;

    or to place more specifically try using
    table[height="56"][width="646"] {
    position: relative !important;
    left: ---px !important;
    top: ---px !important;
  • Thank you.

    From your code I was able to come up with:

    table[align="center"]{width:100% !important; }

    It seems to do what I need.

    I didn't understand how to use the square brackets. In fact - you probably have answered my next post even before I posted it.
  • edited April 2008
    The square brackets are just the selectors. Example:
    table --> selects any & all tables
    table[height="56"][width="646"] --> selects only tables that have a specified height of 56 & width of 646
    table[align="center"] --> only selects tables that are centered.

    If you use the DOM Inspector then it can list all the selectors for any element you want to modify.
  • edited May 2008
    I resurrected this thread since I want to check...

    Is there no easy way to align a table to the left? Instead must I either use a float or position as in srazzano's post of Apr 24th 2008?

    I'm having no luck at aligning #mainPageContents on the left.

    VOA News - VOA News - Voice of America Homepage - News in 45 Languages
Sign In or Register to comment.