|
Posted by Jon Slaughter on 04/15/07 21:31
"Jonathan N. Little" <lws4art@centralva.net> wrote in message
news:60ccd$4622904c$40cba7c0$10376@NAXS.COM...
> Jon Slaughter wrote:
>> Is it possible to do something like assign to an attribute
>> SomeClass.SomeAttribute? If not it should be?
>
> No. You can define a class to be different for different ELEMENTS
>
> P.bigboy { font-size: 2.5em; color: blue; background-color: white; }
> LI.bigboy {font-size: 1.5em; color: white; background-color: black; }
>
ok. I didn't know that. Doesn't help me out now but useful to know in the
future. (I suppose I could use it though to accomplish my task but doesn't
seem any better than just doing it directly).
> You can style ELEMENTS with certain ATTRIBUTES
>
> /* Only ACRONYMs that have a title, but IE again will not coop */
> ACRONYM[title] { border: 1px dotted silver; }
>
>>
>> I have two spots where I use the same value and they have to be the same
>> value at all times. Basically I have to use two divs that have the same
>> width but one is transparent with a higher z-order and the other supplies
>> the background color with a lower z order(while something sits
>> inbetween). In any case, I have to set the width to the same value but
>> I'd rather just keep it in one spot. Would be nice if I could just use
>> width:OtherClass.width; instead of later on forgetting that I had two
>> spots and end up only changing one.
>
> You can apply more than one CLASS to an ELEMENT...
>
> .FrameUp { border: 5px inset blue; padding: .5em; }
> .Landscape { height: 10em; width: 15em; }
> .Portrait { height: 15em; width: 10em; }
>
>
yeah, but when the attribute I need to change is only one element it seems
kinda redudant to create a new class(Since that class is essentially just a
pointer to that element). This is essentially what I did but it seems like
it could be a mess if I have to do it more than a few times.
> <div class="FrameUp Landscape">Framed Landscape</div>
> <div class="FrameUp Portrait">Framed Portrait</div>
>
> BTW: Most times z-index fiddling is not required, only on positioned
> elements and normally can be avoided by the order within the markup.
Yeah, but because the way I have it layed out and the effect I want I have
to to something strange. Maybe it can be done with normal z-indexing and I
have messed up code but thats not so much my problem at this point. (I'll
probably rewrite all the code once I get a grasp of how everything is going
to work)
Thanks,
Jon
Navigation:
[Reply to this message]
|