Cleaning up html code

J

John Smith

Hello again.

I was looking at my tables in the html view and realizing that every darned
row has its own set of tags i.e: border-style, align, valign, bgcolor etc.
etc. This is silly because most of the cells are formatted idenically;
although there are a few header type rows with different attributes in the
middle of the tables.

Is there an easy way to clean this all up? I'd like to assign the tags to
groups of rows, rather than having them tagged individually. (I'd probably
flunk webdesign-school if anyone looked at my html. Its ok though cuz I
never went to webdesign school!)

(I do have a .css sheet set up and am wondering if I should figure out how
to use it for the rows.)

Do you have a quick idea for a tool I could use or is it time for me to pull
out the handy dandy manual yet again???

Thanks for all your help.
 
S

Steve Easton

If each row is an individual table they will each have their own style and attribute tags.
If you use a table that has cells, in other words create a 1 column multiple row table,
then the rows or ( also called cells ) will automatically inherit the properties that are
set in the opening table tag.

To apply your css to the rows, you need to create a class in your css:
..myclass as an example and set your style attributes within it.( it can have any name )

..myclass{
font-color: red;
border-color: green;
}

and then apply the class to the cells by adding class="myclass" to the opening <td
class="myclass"> tag for the cell.

hth
--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
A

Arnold Gao[MSFT]

Hi John,

Some information about CSS:
http://www.w3.org/Style/CSS/
http://www.w3schools.com/css/default.asp

Hope it helps.

Sincerely,

Arnold Gao

Microsoft Partner Online Support


Get Secure! - www.microsoft.com/security

====================================================
When responding to posts, please "Reply to Group" via
your newsreader so
that others may learn and benefit from your issue.
====================================================
This posting is provided "AS IS" with no warranties, and
confers no rights.
 
A

Arnold Gao[MSFT]

Hi John,

Just a supplement. :)

Please try the HTML rules for this. On the find and replace dialog got to
the "HTML tags". Depending on how your page is set you might need to do
this on two operations. You can do something like this: Find tag <TR>,
Replace action <Remove attribute> (or set attribute) and then press the
HTML Rules button. On the HTML rules dialog set the conditions you want for
the TRs, for instance "With attribute STYLE equals ANY VALUE". You can then
use the same method to format them all equal or to set a class to them.

Hope it helps.

Sincerely,

Arnold Gao

Microsoft Partner Online Support


Get Secure! - www.microsoft.com/security

====================================================
When responding to posts, please "Reply to Group" via
your newsreader so
that others may learn and benefit from your issue.
====================================================
This posting is provided "AS IS" with no warranties, and
confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top