----- Original Message ----
From: Keith Purtell <keithpurt...@keithpurtell.com>
To: css discuss <css-d@lists.css-discuss.org>
Sent: Sat, October 8, 2011 3:23:46 PM
Subject: [css-d] Trying to override site style sheet with inline CSS?
I've taken on a project supplying content for an online new source. The problem
is that the guy who set it up did a pretty good job with the PHP (and most the
HTML and CSS) that allows me to use password-protected forms to upload articles
and photos. I can also tweak some of my content occasionally by using inline
CSS.
But one item defies all efforts. For some reason, hiss CSS for general text
content is set up with a 1cm indent, which looks pretty ugly. I've been
tolerating it with paragraphs, but it also kicks in whenever I try to add a
list, which is uglier yet (screen capture:
http://www.keithpurtell.com/kthings/gaps.jpg). I tried inserting inline CSS of
text-indent:0 in both the <ol> and the <li>s but it didn't have any effect.
What
to do to banish this monster?
- Keith Purtell
--------------------
Keith,
The style sheet for the text indent may have ' !important ' added to it. If
that
is the case, one way to override it is to add the same tag to your inline
styling. As the html is read from top to bottom, the second !important will
override the first one (in the style sheet). This may have ramifications
elsewhere in your page so look for any other problems that may crop up. The
following code will show that when you add or delete !important from the
inline
styling, the text will take on the new color or indent, or revert to the
styling
in the embed style sheet.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<body>
<head>
<title>Inline Styling Test</title>
<style TYPE="text/css">
p {color: red !important; text-indent: 100px !important;}
</style>
</head>
<div style="margin:0;padding:0">
<table width="400" height="140" bgcolor="#f0f0f0" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<td valign="top">
<p style="text-indent: 0px !important; color: blue;">Sed ut perspiciatis unde
omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam
rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
beatae vitae dicta sunt explicabo. </p>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
Rod Castello
email marketing specialist
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/