insomniux,1. is it allowed to use two inline STYLE definitions in the same
tag

This will cause a conflict in most browsers I think.

2. is there a way to conditionally apply an inline style (e.g. when
I'm a DIV, do not apply height, when I'm a TEXTAREA, do apply the
height)

textarea.className{height: 80px;}
div.className{height: auto;}

3. is there a way (inline) to reset a previously defined style (e.g.
through the class)

<div class="className1 className2"></div>
(className2 will override className1 styles)


I think this answers your question.

Cheers,
Jamie

On Wed, Dec 3, 2008 at 3:38 PM, insomniux <[EMAIL PROTECTED]> wrote:

>
> Hi, I have a FRAME which can be shown in two ways: editable and non-
> editable. My php program builds both representations in (nearly) the
> same way. The entire page is based on information from a database
> (both layout and content). On my pages I can have a textarea, for
> which I set the height property in an inline style:
>
> <TEXTAREA CLASS='inputfield' STYLE='height:80px; font-weight:bold;'
> >here my text</TEXTAREA>
>
> When my php mechanism builds the 'non-editable' representation, I
> replace the TEXTAREA with a DIV tag:
>
> <DIV CLASS='inputfield' STYLE='height:80px; font-weight:bold;'  >here
> my text</DIV>
>
> The information in the STYLE attribute is picked up from a database,
> meaning, I do not know in advance which styles are defined. In this
> case I want to 'unset' the height property. I've tried to ADD a second
> STYLE attribute: STYLE='height:auto':
>
> <DIV CLASS='inputfield' STYLE='height:80px; font-weight:bold;'
> STYLE='height:auto;'>here my text</DIV>
>
> This however does either nothing (example above) or also resets the
> font-style (when I switch both STYLE definitions).
>
> My questions:
> 1. is it allowed to use two inline STYLE definitions in the same tag
> 2. is there a way to conditionally apply an inline style (e.g. when
> I'm a DIV, do not apply height, when I'm a TEXTAREA, do apply the
> height)
> 3. is there a way (inline) to reset a previously defined style (e.g.
> through the class)
> Thanks
> Insomniux
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
--
You received this because you are subscribed to the "Design the Web with CSS" 
at Google groups.
To post: [email protected]
To unsubscribe: [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---

Reply via email to