Alignment Within Table

admin

Administrator
Staff member
I can't seem to get the text aligned (vertically) in the gray table on the left, no matter what i do, all of the text seems to "center" itself (top to bottom) within the gray box... i'd like the text to start at the top of the grey box and them go down, leaving any extra space at the bottom of the table.<br />
<br />
Please look at the code HERE (<!-- m --><a class="postlink" href="http://www.stevelauren.com/dummy4">http://www.stevelauren.com/dummy4</a><!-- m -->) and let me know if you can assist in any way.<br />
<br />
While you're there, if you have any general suggestions or ways to make the links in the grey box stand out more, your comments would be appreciated.<br />
<br />
Thank you in advance.<!--content-->you would use css for that,<br />
<br />
<td style="vertical-align:top;"><br />
<br />
<br />
remember to put all css into an external stylesheet after.<br />
<br />
to help you with your coding go to <!-- m --><a class="postlink" href="http://validator.w3.org/detailed.html">http://validator.w3.org/detailed.html</a><!-- m --><br />
<br />
i find grey a bit dull anyway, maybe you could change that to a livelier color<!--content-->Leo,<br />
<br />
Thank you for the reply.<br />
<br />
I'm new to all of this (frankly i'm happy with what i've been able to accomplished so far!)<br />
<br />
Could you please let me know where the code you supplied would go?<br />
<br />
Also, what do you mean by adding css to an external style sheet?<br />
<br />
Thank you!!<!--content-->an external stylsheet is where all the css is in an external file and is called in with this line inbetween the head tags<br />
<br />
<link rel="stylesheet" type="text/css" href=http://www.htmlforums.com/archive/index.php/"filename.css" ><br />
<br />
and then called in again with a class<br />
<br />
ie:<br />
<td class="1"><br />
<br />
this being the td that contains your menu,<br />
<br />
now for the stylesheet, open up a text editor (notepad will do) and enter this<br />
<br />
td.1 {vertical-align:top;}<br />
<br />
now save this in text only format and give it a name ending with .css ie:<br />
filename.css<br />
<br />
place it in the same folder as your html file and hey presto<br />
<br />
if you want a different style for a different td you give it another name, ie:<br />
td.2 {blah blah}, or td.3 {blah blah}<br />
<br />
and then call it in with a class and it's respective name <br />
ie <td class="2"><br />
<br />
:)<br />
<br />
/added<br />
<br />
remember to change the filename in this line to whatever you save your stylesheet as<br />
<link rel="stylesheet" type="text/css" href=http://www.htmlforums.com/archive/index.php/"filename.css" ><!--content-->Leo (or anyone else),<br />
<br />
I tried the above but must have done something incorrectly because the page looks the same (maybe i added class="1" in the wrong <td> area?<br />
<br />
If you could have another look, i'd be grateful.<br />
<br />
The code reads filename.css because that's what i named the file that i put on the server in the same folder as this page. (i know, bad habit, but i was just naming it to try out and then was going to re-name it if it worked)<br />
<br />
Thanks again.<!--content-->Woops!!<br />
<br />
Got it to work!! I did indeed put the <class="1"> in the wrong table data cell area!!<br />
<br />
Thanks for your help!<br />
<br />
It is VERY MUCH appreciated.<!--content-->So that i can learn from this experience....<br />
<br />
how come i needed to use css and the following didn't work:<br />
<br />
<td valign="top"><br />
<br />
Seems like the same type of command, but obviously yours worked and mine didn't :D <br />
<br />
Thank you <again><!--content-->that should have worked but it's deprecated anyway, stick with the css :)<br />
<br />
go here (<!-- m --><a class="postlink" href="http://www.w3schools.com/css/default.asp">http://www.w3schools.com/css/default.asp</a><!-- m -->) to learn some more css :)<!--content-->
 
Back
Top