Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Referencing a class in a STYLE attribute

0 views
Skip to first unread message

Stephen Walch

unread,
Jul 21, 2006, 5:45:50 PM7/21/06
to
I am using a third party control where I can specify STYLE attributes but
not CLASS attributes (go figure!). But I really want to use css classes.
Is there a way to specify a class inside a style attribute? For example:

<TD style="class: myClass">

or something like that?

Thanks!


PTM

unread,
Jul 21, 2006, 7:45:13 PM7/21/06
to
"Stephen Walch" <swa...@online.nospam> wrote in message
news:%23gnpJ8Q...@TK2MSFTNGP02.phx.gbl...

Is there some reason why you're not or can't use the more correct

<td class='myClass' style='[STYLE ELEMENTS IN HERE]'>

?


Phil


Stephen Walch

unread,
Jul 23, 2006, 12:14:03 PM7/23/06
to
Because I am not writing the HTML. I am using a 3rd party tool that
dynamically generates the HTML and does not offer the ability to control the
class attribute that gets generated (only the style element).

"PTM" <p.mil...@vodafone.net> wrote in message
news:dGdwg.48369$sz1....@newsfe6-gui.ntli.net...

PTM

unread,
Jul 25, 2006, 5:13:15 PM7/25/06
to
"Stephen Walch" <swa...@online.nospam> wrote in message
news:%23qIMFMn...@TK2MSFTNGP02.phx.gbl...
the style tag is used as a 'where necessary' override to elements called
from the class tag.
what your effectively trying to do is pull your style elements from an
external source, which you cant do

even though your using a 3rd party html editor you should still have access
to both the html text and the css text that are generated. any text editor
will then allow you to alter the code that's been auto generated for you. I
would recommend this site www.htmlcodetutorial.com to help you along if your
not html/css savvy (I use it a lot for quick reference and its really good)

you can also use the validators at www.w3.org if you want to make sure your
code is going to work and be compliant (most 3rd party tools produce poor
code that takes longer to load and might not work with all browsers).
if you're going to be doing a large or lots of sites then getting a decent
text editor (with line counts) and hand coding your pages really is the way
to go.

hope this helps :)

PS: don't pre-post when replying (in other words, stick your reply at the
end, cheers)


0 new messages