html - Right aligning one column and left aligning the other, within one table -


I have created an HTML table with 2 columns. I want the text to be aligned to the first column, but I want the second column to be in the left coalition because there are check boxes in it. This will appear for the presentation, but I do not know. I tried to make a TD class = "column 1", then text-align: true;

HTML

   

Any ideas will be appreciated. = "column 1" & gt; Recovered log: & lt; / Td> & Lt; Td class = "column2" & gt; Input

CSS

  td.column1 {text-align: right; }    

Here you go, it should work :)

  & lt; Style & gt; #mytable {width: 500px; Margin: 0 auto;} #mytable td {width: 250px;} # mytable Left {text-align: right; Background: # 333;} #mytable .right {text-align: left; Background: # 666;} & lt; / Style & gt; & Lt; Table id = "mytable" & gt; & Lt; TR & gt; & Lt; Td square = "left" & gt; 1 & lt; / Td> & Lt; Td square = "true" & gt; 2 & lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt;    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -