473,387 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

any way to ignore span=style

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.
Jul 20 '05 #1
3 5438
Ivo
"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
Jul 20 '05 #2
Ivo wrote:
"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.


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.
Jul 20 '05 #3
Mark Tranchant <ma**@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/
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: David Henderson | last post by:
Hi There... I'm struggling with a problem: I have a string (coming from a rich text editor) which contains a variety of span tags that need to be replaced with corresponding formatting tags....
3
by: Shel | last post by:
Sorry to bother you; in the below test, <SPAN> doesn't do the text alignment. What's wrong? Using Opera 7.50 for Windows. <HTML> <HEAD> </HEAD> <BODY> <P>regular text
3
by: kAldam | last post by:
I am currently using IE 6.0 and 5.5 and the scenario is the following. I have a span that contains text, and the span is beign contained by a table cell (this is the way thing need to be in my...
2
by: Mr. Clean | last post by:
Why would this work: <html> <head> <title>Page 1</title> </head> <body style="background:#C2BFA5;"> <span style="text-align: center; border:thin inset; position:absolute; left:14px;
7
by: ComputerSnack | last post by:
I have a portion of text on a page that I want all inline styles to be ignored. Is there a way to do this? Thanks, Kevin
2
by: toddaa | last post by:
I'm sorry if this has previously asked and answered. I have been searching for a while and have come up empty. I am trying to write a function which will return the font size attribute for the...
5
by: ste.paoletti | last post by:
I have a problem with css I have a this xhtml code: <span> <span> <span/> <input type="radio"/> .... <span/> <input type="button" onclick ="var s=document.createElement('span');...
2
by: ricky | last post by:
Hello, If anyone could help me with this I would highly appreciate it. I've tried everything and nothing works. What I am trying to do is so damn basic and it's just frustrating that it seems...
6
by: liketofindoutwhy | last post by:
There is a link that encloses a span (or a div), but the link won't work in IE 7 (clicking on video image works, but not on the play button), while it works well in Firefox 2 and 3, and Safari 3....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.