-
1. Re: CSS font: inherit - Messes up Design view
osgood_ May 19, 2011 8:19 AM (in response to brian-j)brian-j wrote:
I'm using Eric Meyers CSS reset, which applies "font: inherit" to many CSS selectors. In Dreamweaver CS4 including "font: inherit" in the CSS disables all the font families I've specified in my style sheet. So, in Design view, all text displays in the default serif font... but in Live View the correct font families are rendered.
Here's the CSS reset:
/* Based on http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 License: none (public domain) */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; }Any body else run into this or know why this is happening? I've just been taking "font: inherit" out of my reset CSS because it's a hassle not being able to see the correct fonts in Design view.
Thanks much,
Brian
I'm no great admirer of Myers. He has had his day and doesn't do much web stuff any longer, might talk lots but mostly hot air. I think he prefers playing his banjo of whatever it was he plays.
<div> by default has no margin or padding or border so I have no idea why that is in the equation. Seems like he has grouped just about anything and everything together just in case without really knowing why.
Resets are more pain than they are worth in my persnal opionion. You pays your money and you takes your choice. Thankfully this one was free because its pure crap.
-
2. Re: CSS font: inherit - Messes up Design view
pziecina May 19, 2011 8:20 AM (in response to brian-j)Hi
This is a bug in DW CS4's design rendering, in that the design mode does not show the correct font when font: inherit; is used above a rule in the cascade.
Firefox also suffered a similar problem when inherit was used for the font-family back in version 2, (circa. 05/06).
PZ
-
3. Re: CSS font: inherit - Messes up Design view
pziecina May 19, 2011 8:36 AM (in response to osgood_)Hi osgood
Including the font-size: 100% is also the browser default, it resets nothing as far as I know. After all it is only saying too the browser. 'use the default settings, whatever they may be'. Now if it said something like - font-size: 14px; - it would be setting a baseline, or am I missing something?
PZ
Added: Just read EM's post regarding this on his site, and he does say that this is a starter css reset, and should be modified as required. So maybe we are doing him an injustice here.
Message was edited by: pziecina
-
4. Re: CSS font: inherit - Messes up Design view
osgood_ May 19, 2011 8:37 AM (in response to pziecina)pziecina wrote:
Hi osgood
Including the font-size: 100% is also the browser default, it resets nothing as far as I know. After all it is only saying too the browser. 'use the default settings, whatever they may be'. Now if it said something like - font-size: 14px; - it would be setting a baseline, or am I missing something?
PZ
To be honest I've always thought Eric used a sledge hammer to crack a nut. Yes, he was kind of ahead of the time about 10 years ago consistantly informing everyone what could be achieve a decade later, which was no use in Netscape 4x. lol
I don't know what's happened to this guy but from his websites he seems to have gone awol. I would'nt advise anyone to be following his preachings now. Way passed his sell by date.
How bitchy am I today
'The Shockers' definitely having an effect on me, not lol
-
5. Re: CSS font: inherit - Messes up Design view
osgood_ May 19, 2011 8:42 AM (in response to pziecina)Added: Just read EM's post regarding this on his site, and he does say that this is a starter css reset, and should be modified as required. So maybe we are doing him an injustice here.
Still no logic to why <div> is included. Only include those elements that are affected. Maybe he thinks in 10 years time <div> will have a default margin, padding and border, lol.
-
6. Re: CSS font: inherit - Messes up Design view
brian-j May 19, 2011 9:08 AM (in response to brian-j)I appreciate everyone's input. I've never had the opportunity to work with other web designers, so I learn all I can on my own and do my best to adopt best practices.I've always felt like Eric's reset was overkill, at least for my purposes, but thought maybe there was advanced stuff I wasn't aware of that would benefit from all the CSS reset.
Based on the input I've received I think I'll pare down the reset I use and get rid of a lot of the fluff.
Thanks all, much appreciated.
Brian
-
7. Re: CSS font: inherit - Messes up Design view
pziecina May 19, 2011 9:32 AM (in response to brian-j)Hi
Don't let us put you off using a css reset, (I use one also). But remember that they should be modified to suite your purpose, e.g.the -
font-size: 100%; font: inherit;
Should be replaced with your default values, so if you wish your default font-size to be 12px then insert it, as for the font: inherit; rule, I would suggest you replace this with -font-family: Georgia, Palatino, "Palatino Linotype", Times, "Times New Roman", serif ;
(change the font list to what you require)This way you will give a base to everything, (even divs ) for your css.
PZ
-
8. Re: CSS font: inherit - Messes up Design view
brian-j May 20, 2011 5:13 AM (in response to brian-j)Cool, thanks for the additional input pziecina. I always define the base font stlyle in a style for "Body" immediately following the reset CSS in my style sheet. I'll do some tinkering with the reset to customize it more to meet my needs as you've suggested.
Thanks much,
Brian



