RE: Applying a CSS style to the ActiveX placeholder
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > RE: Applying a CSS style to the ActiveX placeholder




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    RE: Applying a CSS style to the ActiveX placeholder  
Kyle


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-26-04 02:36 PM

Does anyone have an idea why this might be happening? Neither the foreground
 color nor the background color are applied to the ActiveX control, despite 
what the CSS class says. I found a workaround so that the background color i
s applied to the ActiveX co
ntrol but that doesn't do me any good if the foreground color doesn't work. 
Right now, the only solution I can think of is to parse the CSS file, find t
he class I want, and apply the color/background-color to the placeholder's b
ody element explicitly.





[ Post a follow-up to this message ]



    RE: Applying a CSS style to the ActiveX placeholder  
Trevor Grant


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-27-04 04:35 AM

Hi Kyle

Could you tell us how the Css styles were applied?

I've tested the control using an externally linked css
file e.g:

<LINK href="myStyle.css" type="text/css" rel="stylesheet">
which contains:
.myCssClass
{
color: brown;
background-color:yellow;
}

and all the styles were applied, color, background and all.

Hmmm.. are you embedding the styles within a
<style></style> tag? Or maybe there is something else
overriding the styles?

Trevor

>-----Original Message-----
>Does anyone have an idea why this might be happening?
Neither the foreground color nor the background color are
applied to the ActiveX control, despite what the CSS class
says. I found a workaround so that the background color is
applied to the ActiveX control but that doesn't do me any
good if the foreground color doesn't work. Right now, the
only solution I can think of is to parse the CSS file,
find the class I want, and apply the color/background-
color to the placeholder's body element explicitly.
>.
>





[ Post a follow-up to this message ]



    RE: Applying a CSS style to the ActiveX placeholder  
Kyle


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-29-04 06:37 PM

Thanks for the response, Trevor. I feel foolish admitting this but the reaso
n I was having a problem is because we have nested styles in our CSS. Our st
ylesheet looks similar to this:

.placeholderStyle {font-weight: bold;}
.bodyStyle .placeholderStyle {color: white; background-color: grey;}

We apply the bodyStyle class to the BODY element and the placeholderStyle cl
XXX to the placeholder. I was applying the placeholderStyle class to the pPl
aceholder.dom.body.className property in Stefan's AutoCssHtmlPhControl but n
ot the bodyStyle.

Which leads to another question. How can I handle this type of nested CSS st
yles with the ActiveX placeholder? The second style applies only to elements
 with a placeholderStyle class contained with elements with a bodyStyle. But
 I'm applying the placehold
erStyle to the ActiveX's body so there is nothing higher in the hierarchy to
 apply the bodyStyle to.

My current "solution": I apply the bodyStyle to the ActiveX's body, then pro
grammatically wrap the placeholder's content in a div or a span with the pla
ceholderStyle class. I don't like this because it adds the div/span wrapper 
to the placeholder content
so it has to be stripped again on save (assuming the user hasn't deleted it 
herself).

Modifying the CSS is another solution but that will be tough to change. Any 
other ideas?





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:24 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register