![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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? Could you be more specific or post an example/URL? |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
I was told that inline css tags overwrite anything else, however, I guess I want to do the opposite, but only for this section. How do I do it? Could it be with another inline tag? No chance. You *can* put two style-Attributes in one Element but this is |
#5
| |||
| |||
|
|
Hi, I was told that inline css tags overwrite anything else, however, I guess I want to do the opposite, but only for this section. How do I do it? Could it be with another inline tag? No chance. You *can* put two style-Attributes in one Element but this is no valid HTML and the results will be chaotic - depending on the browser. |
#6
| |||
| |||
|
|
Okay, I have a page that is dynamically generated from a database. One of the database fields has a lot of misc. html and inline style tags in it. |
#7
| |||
| |||
|
|
On 10 Dec 2004 01:54:44 -0800, ComputerSnack <praegerk (AT) yahoo (DOT) com wrote: Okay, I have a page that is dynamically generated from a database. One of the database fields has a lot of misc. html and inline style tags in it. I would be remiss to fail to mention this: while you might have your hands tied in this matter, this is about the worst way to implement this. There is no means for removing style completely once it's applied - the best you can do is replace it with some other style, which may or may not match the particular UA's rendering defaults. It's a little like salting your soup. You can always add a bit more, but you can't really take it out once it's in there. Therefore, the best way to implement what you're after is to send no CSS with the data, and instead add the CSS only where you want it. The best means based on what you have is to use a server script to remove all style attributes from the included markup, and then add new CSS to it as you require. |
#8
| |||
| |||
|
|
Thanks for everyone's comments. I found a solution that worked perfectly from a post at another forum. His solution was to use the !important modifier. It worked great. It forced my css to overrite any of the users inline or any other css. Here is a link to the thread: http://www.htmlforums.com/showthread...threadid=50345 Here is the message. It's from htmlforums.com ----- You might have some luck using the !important modifier. !important designates a CSS rule as not overridable. |
![]() |
| Thread Tools | |
| Display Modes | |
| |