Forum Moderators: not2easy

Message Too Old, No Replies

Setting attribute values

Setting HTML attribute values with pseudo

         

RootAdmen

11:48 pm on Jul 28, 2005 (gmt 0)

10+ Year Member



I believe I have seen this done, but am blanking out on how:

I want to use a pseudo attribute selector and say:
if HTML attribute A is equal to value A, then set HTML attribute B to value B
OR
if HTML atruibute A is equal to value A, then set attribute A to value B
Ether one would do in my case.
I know how to use pseudo (tag[attribute=value]) but I am not sure how to set non CSS values (ex. href or src) using CSS.

I am not sure if this is clear enough, ask me for more info if it is not clear.

MX_OnD

11:52 pm on Jul 28, 2005 (gmt 0)

10+ Year Member



could you use a variable to set different css files?

MWpro

11:56 pm on Jul 28, 2005 (gmt 0)

10+ Year Member



I'm not really clear on what you are trying to do, but it sounds like you should look into javascript to accomplish this.

RootAdmen

11:58 pm on Jul 28, 2005 (gmt 0)

10+ Year Member



no, this is a page that i can partilly customize, by redefineing CSS tags, but i dont not have sorce access, im trying to do this w/ CSS

MWpro

1:44 am on Jul 29, 2005 (gmt 0)

10+ Year Member



CSS cannot process information like this.

Setek

6:57 am on Jul 29, 2005 (gmt 0)

10+ Year Member



I believe CSS3 has attribute support... However, I think its functionality is inapplicable to you - it would only work on stuff like:
if <input> has attribute type="radio" then set border: 0;

(Oh, attribute support with browsers I think is still very, very minimal too, anyway :D)

You can't use CSS to change attributes themselves - CSS doesn't change HTML itself, merely how it is displayed.

As aforementioned, use Javascript.