473,587 Members | 2,316 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="backgrou nd:#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 5487
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="backgrou nd:#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(white pixel.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="backgrou nd:#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(white pixel.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
1927
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. e.g. <span style="font-weight: bold;">line 2</span> needs to become
3
14975
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
12419
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 application). I have an issue when the span has a heigth less than 18px (meaning height of the span, there is only one line of text and the height of...
2
1921
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
11275
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
1918
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 current location of the cursor in an editable iframe. Unfortunately, queryCommandValue doesnt seem to be working. Instead of using the FONT tag...
5
3244
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'); this.previousSibling.firstChild.appendChild(s); "/>
2
3936
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 there's no support for this. Either that or I'm doing something wrong. Well, enough venting, here's what I need. Using this sample XML file...
6
4470
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. The intention is to make the link clickable on both the play button and the video image. the page is http://www.0011.com/test/test_link.html ...
0
7915
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8339
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3840
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.