![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm trying to arrive at a kind of "industry standard" or "best practice" approach to CSS for a policy document aimed at developers, but not necessarily very experienced developers. What does the CIWAS community think is the best way to go about styling documents for maximum compatibility/minimum problems with old browsers. |
|
If I'm right, where would I find a definitive style sheet which has the BMH, the Empty A Declaration and so on, such that I can give people this stylesheet and mark it up like: [snip] so as to make it pretty much solid and, not idiot-proof, but let's say, as easy as possible to adapt for a person styling up a page? |
#3
| ||||
| ||||
|
|
"Maximum compatibility" and "minimum problems" are very different things. Maximum compatibility with old browsers implies that you are disinterested in using any of the features available to newer browsers and that your main concern is making it "look the same". If so, why? |
|
maximum compatibility/minimum problems with old browsers. |
|
Don't let people "style up" pages. Write a glossary of organization-approved classnames and when to use them. Let people mark up pages accordingly. If it isn't in the glossary, it's "plain vanilla" HTML. |
|
(BTW: CIWAS should have such a glossary with the FAQ and get this .navigation/.navbar/.nav/.sitenav thing sorted out once and for all.) |
#4
| ||||
| ||||
|
|
google-2003-03 (AT) kjsmith (DOT) com (Karl Smith) wrote: "Maximum compatibility" and "minimum problems" are very different things. Maximum compatibility with old browsers implies that you are disinterested in using any of the features available to newer browsers and that your main concern is making it "look the same". If so, why? No, I'm definitely not in the business of trying to make everything look the same. I want a style sheet that does use the features of new browsers. .... OK I'll put what I want in a different way. I want to provide my developers a style sheet which allowed them to test a certain declaration, see that it cause horrible problems in Netscape 4, and easily move it to a "Netscape 4 can't see this" part of the style sheet. |
|
Don't let people "style up" pages. Write a glossary of organization-approved classnames and when to use them. Let people mark up pages accordingly. If it isn't in the glossary, it's "plain vanilla" HTML. That's certainly an interesting approach. I'm not sure "don't let people style up pages" would work in our organisation with many different kinds of web pages. |
|
One page has horizontal breadcrumb nav, another has traditional vertical left nav, a third has *two* levels of left-hand nav and so on, how can I write a stylesheet in advance for all these variations? |
|
(BTW: CIWAS should have such a glossary with the FAQ and get this .navigation/.navbar/.nav/.sitenav thing sorted out once and for all.) Good idea. I'd like you to elaborate on that. |
#5
| |||
| |||
|
|
Don't let people "style up" pages. Write a glossary of organization-approved classnames and when to use them. |
|
Let people mark up pages accordingly. If it isn't in the glossary, it's "plain vanilla" HTML. That's certainly an interesting approach. I'm not sure "don't let people style up pages" would work in our organisation with many different kinds of web pages. One page has horizontal breadcrumb nav, another has traditional vertical left nav, a third has *two* levels of left-hand nav and so on, how can I write a stylesheet in advance for all these variations? |
#6
| |||
| |||
|
|
I think that if you write one stylesheet for three fundamentally different page types that you are writing an unnesessarily complex stylesheet that will become difficult to maintain. [snip] |
#7
| ||||
| ||||
|
|
[snip] I think that if you write one stylesheet for three fundamentally different page types that you are writing an unnesessarily complex stylesheet that will become difficult to maintain. [snip] Yes - but where do you draw the line? For example, I have a number of tableless-layout "templates" and a number of colour-schemes. But I didn't want (currently) 3 x 8 = 24 CSSs. In fact, from experience, I didn't want 8, or even 3. (At one point I used a number of CSSs with @import for the common parts, but that had its own problems). |
|
The key was that the similarities out-weighed the differences. |
|
Although the top-level layout was different, this was only about 5 CSS rules that were different from one to another. And the colour schemes were easy to handle with a single CSS. Nearly everything else - button styles, text styles, list styles, were the same. So I use decendent selectors based on a couple of "id"s (one in the body>, one in an outer <div>) to control these 24 combinations with a single CSS. See the URL below. |
|
I think the key is your "fundamentally different page types". Mine were not - but for a fundamentally different purpose (such as photograph pages) I have a separate CSS. http://www.barry.pearson.name/articles/templates/ -- Barry Pearson http://www.Barry.Pearson.name/photography/ http://www.BirdsAndAnimals.info/ http://www.ChildSupportAnalysis.co.uk/ |
#8
| |||
| |||
|
|
Barry Pearson wrote ... [snip] Yes - but where do you draw the line? For example, I have a number of tableless-layout "templates" and a number of colour-schemes. But I didn't want (currently) 3 x 8 = 24 CSSs. In fact, from experience, I didn't want 8, or even 3. (At one point I used a number of CSSs with @import for the common parts, but that had its own problems). I'd never advocate seperate stylesheets for seperate colors schemes |
|
So I use decendent selectors based on a couple of "id"s (one in the body>, one in an outer <div>) to control these 24 combinations with a single CSS. See the URL below. There is always a tradoff between portability and readability. Certainly one of anything is easier to move/install than several. I think what you have done is clever, setting the page color scheme by setting the body id. That's good for someone trying out different schemes, but bad for adding a lot of extra styles that would never be used in a production site. After all, you are only using one color scheme! [snip] |
![]() |
| Thread Tools | |
| Display Modes | |
| |