Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





  Last Thread  Next Thread
Author
Thread Post New Thread   

any way to ignore span=style
 

macgyver




quote this post edit post

IP Loged report this post

Old Post  07-30-04 - 04:16 AM  
This is a strange question, and I think the answer is NO, but I am
asking anyway.

I am a member of a website which allows us to alter our member
profiles.  Using css in the middle of the profile area allows one to
overide the normal formatting of the entire page and truly customize
it.  But there is a span-style tag which gives an ugly blue background
to certain text which I want to get rid of.  This is the tag:

<span style="background:#004D73; color:white;">

Is there anything I can do to make the browser ignore this or override
it?  It is within a div-class tag named copy and using .copy I can
chage the rest of the div, but not the area within the span-style tag.


Post Follow-Up to this message ]
Re: any way to ignore span=style
 

Ivo




quote this post edit post

IP Loged report this post

Old Post  07-30-04 - 04:16 AM  
"macgyver" wrote
> This is a strange question, and I think the answer is NO, but I am
> asking anyway.
>
> I am a member of a website which allows us to alter our member
> profiles.  Using css in the middle of the profile area allows one to
> overide the normal formatting of the entire page and truly customize
> it.  But there is a span-style tag which gives an ugly blue background
> to certain text which I want to get rid of.  This is the tag:
>
> <span style="background:#004D73; color:white;">
>
> Is there anything I can do to make the browser ignore this or override
> it?  It is within a div-class tag named copy and using .copy I can
> chage the rest of the div, but not the area within the span-style tag.

div.copy span {display:none;}
removes the span entirely while leaving the rest of div as is.
or
div.copy span {background-image:url(whitepixel.png);}
covers the blue with an image of your choice, as long as it is not
transparant. I am not sure if the shorthand "background" declaration in the
span overrides this.

The only answers I can think of that do not evaluate to NO.
HTH
Ivo




Post Follow-Up to this message ]
Re: any way to ignore span=style
 

Mark Tranchant




quote this post edit post

IP Loged report this post

Old Post  07-30-04 - 09:15 AM  
Ivo wrote:

> "macgyver" wrote
> 
>
>
>    div.copy span {display:none;}
> removes the span entirely while leaving the rest of div as is.
> or
>    div.copy span {background-image:url(whitepixel.png);}
> covers the blue with an image of your choice, as long as it is not
> transparant. I am not sure if the shorthand "background" declaration in th
e
> span overrides this.

Something being implied but not stated here is that the style attribute
effectively overrides the style sheet.

See http://www.w3.org/TR/REC-CSS1#cascading-order :

5. Sort by order specified: if two rules have the same weight, the
latter specified wins. Rules in imported style sheets are considered to
be before any rules in the style sheet itself.

<snip>

A declaration in the 'STYLE' attribute of an element (see section 1.1
for an example) has the same weight as a declaration with an ID-based
selector that is specified at the end of the style sheet:

<STYLE TYPE="text/css">
#x97z { color: blue }
</STYLE>

<P ID=x97z STYLE="color: red">

In the above example, the color of the 'P' element would be red.
Although the specificity is the same for both declarations, the
declaration in the 'STYLE' attribute will override the one in the
'STYLE' element because of cascading rule number 5.



The only solution I can think of is to use Javascript to re-style the
<span>s after the document has loaded.

--
Mark.




Post Follow-Up to this message ]
Re: any way to ignore span=style
 

Jukka K. Korpela




quote this post edit post

IP Loged report this post

Old Post  07-30-04 - 12:15 PM  
Mark Tranchant <mark@tranchant.plus.com> wrote:

> Something being implied but not stated here is that the style
> attribute effectively overrides the style sheet.

Not quite. You can use the !important specifier.

div.copy span { background: white !important;
color: black !important; }

--
Yucca, http://www.cs.tut.fi/~jkorpela/


Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 02:55 PM. Post New Thread   
  Previous Last Thread   Next Thread next
Stylesheets archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top