Help with CSS: Overriding inline CSS

(Greg Schneck) #1

I have tons of old pages with inline css that look like this:

I want to override the Font and Font-Size only… NOT the Font Weight of BOLD.
This css over-rides all three giving me new size and font but setting in regular and not bold.

Is it possible to do this leaving the bold setting?

I should add that I have text that appears in both plain and bold so I can’t simply specify a “bold” attribute in my over-ride. It needs to “inherit” the orignail (regular or bold.) The “span” can be either bold or regular.

(Will Woodgate) #2

Try this:

span {
font-family: Times, Georgia, Courier, serif !important;
font-size: 16px !important;
font-weight: inherit;

Because you are setting the font weight twice in the inline CSS, that might also be causing some problems and might need to be updated. But it is perfectly feasible to specify font size, weight and face separately.

Font size screwup
(Greg Schneck) #3

Perfect! I now just need to add an inherit for italic also… Thanks Will! (not sure why the double bold setting- these are old pages from before I took this project- pasted in.

Thanks Much…

btw… my site is now running with your responsive Media Theme and I’m using your responsive stacks like crazy in re-doing my site. Thanks for all you do!

(Greg Schneck) #4

to finalize… here is my final code which works great:

(Will Woodgate) #5

That’s great to hear, thanks for the feedback.