views:

30

answers:

3

I have a page here:

http://animactions.ca/Animactions/accueil.php

and it has a right column. When the right column's content is longer than then the main content, the main content centers rather than start at the top despite I defining it in a style not to do so.

From my style sheet:

.tbsyles {
    margin: 0px;
    text-align: justify;
    width: 200px;
    border-left-style: solid;
    border-left-width: 1px;
    border-left-color: #A8CFE4;
    padding-left: 30px;
    height: 100%;
    line-height: 100%;
    vertical-align: top;
    padding-right: 0px;
}
.tablestylea {
    width: 900px;
    margin: 0px;
    text-align: justify;

    height: 100%;
    line-height: 100%;
    vertical-align: top;
    padding-right: 0px;

}

How can I make it so no matter what the length of my right col content the main content page resizes correctly and starts from the top rather than from the center?

Thanks

A: 

try use float:right; on the right column css div.

RobertPitt
+2  A: 

add .style2{vertical-align:top;} in your css

Raine
A: 

in your html, at the "td" tag, apply the valign="top", like that, the content of that particular "td" will be align at the top...

Another thing is the align="left" (or right), to set the text horizontal align...

see: W3C TABLE SPECS

EDITING:

If you're using "div" tag to make your layout, use: display:table-cell; and then use the already provided solution for your css file: vertical-align:top;

Zuul
valign is an HTML attribute. Styling should be done in CSS, not in the HTML code. IE6 and IE7 don't understand display: table-cell; so it still can't be used nowadays ...
Felipe Alsacreations
Well, just to confirm... do you read w3c specs ?Because that state that valign and align is very well in use, being obsolete at HTML5... but that means 5 or 6 versions of browsers before you start to have problems, meaning 10 years?Don't be worried about that for now... :)And if you are worried with IE6, you don't have any other way... or valign or a hole bunch of code to simulate the process :)
Zuul