Forum Moderators: not2easy
The page contains a table with several columns and rows. I would like to center the cell content of every row taking as centering point the text between the tags <font color="red"> (see below). The purpose is that all instances of this text be aligned one below the previous as in a column. The tags of the row are the following (the content is mine):
<td valign="top">
<font face="Verdana" size="2">This is the left side
<font color="red">this should be at the center</font>this is the right side</font>
</td>
All the instances of the text "this should be at the center" should be visualized like a column.
I have tried to apply the "text-align: <string>" property, but I have been unable to make it work.
Thanks in advance for your help.
revuelta
I have tried to apply the "text-align: <string>" property, but I have been unable to make it work.
Actually, it does work. The text gets centered within the font tag. You just can't tell, since the font tag is an inline element. Try something like this:
<td valign="top" style="text-align: center;">
<div style="float: left;">This is the left side</div>
<div style="float: right;">this is the right side</div>
this should be at the center
</td>
I'm afraid I haven't explained accurately enough my purpose. I don't want to modify the web pages themselves, that are not mine and change dynamically. They are just requests from a database available through internet. I just want to modify the visualization through CSS. Safari allows to apply user's Cascading Style Sheets upon web pages accesed though internet, so they are viewed as the user wants and not as they were created.
I just want to know how to write a CSS to visualize differently those existing pages. Till now I have written the following code:
/* CSS Document */
[face=Verdana] {
font-family: "Times Greek";
font-size: 14pt;
}
*[color=red] {
color: #3333FF;
font-size: 120%;
font-weight: bold;
font-family: "Times Greek";
font-variant: small-caps;
display: ;
text-align: center;
}
TD {
font-family: "TITUS Cyberbit Basic";
font-variant: normal;
}
I am sorry for such a long and confusion explanation. I am new.
Thank you for your time and patience. I do really appreciate.
Revuelta