![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am halfway through writing a tutorial on image slicing for fluid CSS layouts, I would love some feedback on what I've done up until this point: http://nrkn.com/index.html I am still writing parts 3 & 4, "optimising the layout" and "alpha transparency". Also, does anyone know why I don't get numbers or bullets on my ul and olin Internet Explorer (6 or 7)? Thanks! |
#3
| |||||
| |||||
|
|
On 7 nov, 23:44, "Nik Coughlin" <nrkn.... (AT) gmail (DOT) com> wrote: I am halfway through writing a tutorial on image slicing for fluid CSS layouts, I would love some feedback on what I've done up until this point: http://nrkn.com/index.html I truly and completely believe that you should avoid this kind of markup code: Line 27: <div id="mainT"><div><div></div></div></div |
With CSS 3 you can assign|
Line 30: <div id="contentTL"></div div id="contentTR"></div |
|
Line 34: <div class="hr"><div><div><hr></div></div></div Line 81: <div class="hr"><div><div><hr></div></div></div |
|
There is such a thing as over-excessively declaring, using and abusing div> declarations: it's called divitis and it is defined at |

|
Remember/keep in mind that the original purpose and goal of using CSS was to reduce resorting/recourse of bloated markup code: if your CSS code does not achieve that, then you should examine how you could reduce the depth and the width of the DOM tree of nodes. |
Would love to be proven wrong.
#4
| |||
| |||
|
|
I am halfway through writing a tutorial on image slicing for fluid CSS layouts, I would love some feedback on what I've done up until this point: http://nrkn.com/index.html I am still writing parts 3 & 4, "optimising the layout" and "alpha transparency". Also, does anyone know why I don't get numbers or bullets on my ul and olin Internet Explorer (6 or 7)? Thanks! |
#5
| |||
| |||
|
|
I believe that this is the minimum amount of markup necessary to achieve this effect Would love to be proven wrong.Is the effect worth the internal complexity? |
#6
| |||||||||
| |||||||||
|
|
On 7 nov, 23:44, "Nik Coughlin" <nrkn.... (AT) gmail (DOT) com> wrote: I am halfway through writing a tutorial on image slicing for fluid CSS layouts, I would love some feedback on what I've done up until this point: http://nrkn.com/index.html Hello again, |
|
You first declared ol {font-weight: bold;} in ol { color: #5ac90f; font-weight: bold; margin: 1em; } and ol span {font-weight: normal;} |

|
ol span { color: #b95207; font-weight: normal; } (Notice here that you re-declare the color for the span instead of using inheritance. All you had to do is declare color: #b95207 for the ol element and that was it!) |
|
then used <strong> on 3 chunks of text (only 6 words) and then declared 7 <span> with font-weight: normal;. |
|
When debugging your code, I removed all that. Everything. And just let the 3 semantic <strong> for the 3 chunks of text (a grand total of 6 words). I removed 7 non-semantic <span>, removed both font-weight declarations, remove 1 color declaration and replace the remaing one with #b95207, then removed the ol span CSS rule. Your CSS code is definitevly improvable, optimizable. |
|
Also, this universal selector rule * { margin: 0; padding: 0; } is a clear sign of over-declaring, over-defining. The use of the universal selector is very rarely recommendable and is discouraged by many CSS gurus. |
I like this a lot as it|
By removing all margin and padding on all elements, you are later force to add them back almost everywhere (for almost all elements like p, li, headings, etc) instead of relying on browser default declarations. |
|
Finally, regarding your question of disappearing list markers in MSIE 7, you need to increase the margin on the ol to at least 1.5em. I have created a reduced testcase showing this phenomenon, where the list markers disappear at around margin: 1.1em. IE has a particular way of displaying list markers.. |
|
Regards and good luck, |
#7
| |||
| |||
|
|
Nik Coughlin wrote: I believe that this is the minimum amount of markup necessary to achieve this effect Would love to be proven wrong.Is the effect worth the internal complexity? Maybe it would be better to just spend more time in the Gimp perfecting normal images, keeping the page itself simple. |
|
Forcing markup like this: div class="hr"><div><div><hr></div></div></div is just unsemantic, even though it is technically valid. |

#8
| |||
| |||
|
|
Nik Coughlin wrote: I believe that this is the minimum amount of markup necessary to achieve this effect Would love to be proven wrong.Is the effect worth the internal complexity? |
|
Forcing markup like this: div class="hr"><div><div><hr></div></div></div is just unsemantic, even though it is technically valid. |
#9
| |||
| |||
|
|
In article <13j5b6j72c0ahfc (AT) corp (DOT) supernews.com>, mbstevens <NOXwebmasterx (AT) xmbstevensx (DOT) com> wrote: Nik Coughlin wrote: I believe that this is the minimum amount of markup necessary to achieve this effect Would love to be proven wrong.Is the effect worth the internal complexity? Depends on how you count it. It only has to be done once by the author, and from then on it can give multiple pleasure. On principle, this may well be worth it. Forcing markup like this: div class="hr"><div><div><hr></div></div></div is just unsemantic, even though it is technically valid. This is yet another issue. But, given that there are limitations in browser implementations of some css where this sort of thing can be more easily done in a kosher manner, it is very severe to never fall to temptation. Perhaps it is an area where a little individual choice might be allowable. |
I try to only compromise on these things when a visual effect
#10
| |||
| |||
|
|
dorayme wrote: In article <13j5b6j72c0ahfc (AT) corp (DOT) supernews.com>, mbstevens <NOXwebmasterx (AT) xmbstevensx (DOT) com> wrote: Nik Coughlin wrote: I believe that this is the minimum amount of markup necessary to achieve this effect Would love to be proven wrong.Is the effect worth the internal complexity? Depends on how you count it. It only has to be done once by the author, and from then on it can give multiple pleasure. On principle, this may well be worth it. Forcing markup like this: div class="hr"><div><div><hr></div></div></div is just unsemantic, even though it is technically valid. This is yet another issue. But, given that there are limitations in browser implementations of some css where this sort of thing can be more easily done in a kosher manner, it is very severe to never fall to temptation. Perhaps it is an area where a little individual choice might be allowable. I hope so I try to only compromise on these things when a visual effectthat I want is otherwise unattainable. Oh, for multi-browser support of CSS3! |

![]() |
| Thread Tools | |
| Display Modes | |
| |