473,774 Members | 2,176 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Critique, image slicing for fluid CSS layout tutorial

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 ol in
Internet Explorer (6 or 7)?

Thanks!
Nov 8 '07 #1
18 2510
On 7 nov, 23:44, "Nik Coughlin" <nrkn....@gmail .comwrote:
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!
Nik,

Whatever the explanations are for the semi-disappeared (or entirely
disappeared) list markers in Internet Explorer 7, I truly and
completely believe that you should avoid this kind of markup code:

Line 27: <div id="mainT"><div ><div></div></div></div>

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>

Line 89: <div id="mainB"><div ><div></div></div></div>

There is such a thing as over-excessively declaring, using and abusing
<divdeclaration s: it's called divitis and it is defined at

Developing With Web Standards
Recommendations and best practices
Superfluous elements and classes
http://www.456bereastreet.com/lab/de...dards/css/#css

and at

Web Page Development: Best Practices
Classitis and Divitis
http://developer.apple.com/internet/...estwebdev.html

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.

Regards, Gérard

Nov 8 '07 #2
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.
Nov 8 '07 #3
On 7 nov, 23:44, "Nik Coughlin" <nrkn....@gmail .comwrote:
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!
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 <strongon 3 chunks of text (only 6 words)

and then declared 7 <spanwith font-weight: normal;.

When debugging your code, I removed all that. Everything. And just let
the 3 semantic <strongfor 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.
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. I personally never do that and I certainly do not
encourage that practice because it invariably lead to over-declaring,
over-defining.

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,

Gérard

Nov 8 '07 #4
GTalbot wrote:
On 7 nov, 23:44, "Nik Coughlin" <nrkn....@gmail .comwrote:
>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,
Hi!
You first declared

ol {font-weight: bold;}

in

ol {
color: #5ac90f;
font-weight: bold;
margin: 1em;
}

and ol span {font-weight: normal;}
You're right, I'm not quite sure why I did that :)
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!)
Actually, the reason for declaring a color for the ol and then wrapping the
li content in a span is so that that the list markers have a different
colour to the list items. There *is* method to the madness! Some would say
that it's not worth having to have the extra markup just to have different
coloured markers, but I think it makes quite a big difference visually, so I
am willing to make that sacrifice.
then used <strongon 3 chunks of text (only 6 words)

and then declared 7 <spanwith font-weight: normal;.
Yeah, the font-weight thing is a cock-up.
When debugging your code, I removed all that. Everything. And just let
the 3 semantic <strongfor 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.
Yep, there are some rules that can be combined that I can see right off the
bat. Anything else off the top of your head that you've noticed is
particularly in need of improvement, or do you just mean combining rules
that are repeated?
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.
We will have to agree to disagree on this :) I like this a lot as it
equalizes the way browsers set margins and padding, which are different
between different browsers for different elements.
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.
I find with the layouts that I tend to do it's the opposite, I am always
turning margin and paddings *off* on multiple elements, and with the
universal selector I only end up turning them back on in a few places.
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..
Excellent, thank you very, very much!
Regards and good luck,
Thanks again. I really appreciate you taking your time to discuss this with
me. It has been a pleasure, even if we disagree on some things!
Nov 8 '07 #5
mbstevens 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?
Maybe it would be better to just spend more time in the Gimp
perfecting normal images, keeping the page itself simple.
No amount of time spent in the Gimp will help me make an image that
stretches to fit the available width though!
Forcing markup like this:
<div class="hr"><div ><div><hr></div></div></div>
is just unsemantic, even though it is technically valid.
Well, for me, sometimes there are trade offs between getting a visual
effect, and being semantically correct. The extra div wrappers are to get
the visual effect (divider that fades away at the edges and resizes to fit
the available width), the <hris there so that there is still a horizontal
rule when CSS isn't present.

Some of these things are just necessary to address the shortcomings of
browser support for HTML/CSS -- almost all of these shortcomings are
addressed in CSS3. If IE/Opera/FF supported multiple background images on a
single element (Safari does) then it wouldn't be necessary.

How I wish it were so!

Thanks for your time :)
Nov 8 '07 #6
In article <13************ *@corp.supernew s.com>,
mbstevens <NO***********@ xmbstevensx.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.

--
dorayme
Nov 8 '07 #7
dorayme wrote:
In article <13************ *@corp.supernew s.com>,
mbstevens <NO***********@ xmbstevensx.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 effect
that I want is otherwise unattainable. Oh, for multi-browser support of
CSS3!
Nov 8 '07 #8
In article <fg**********@a ioe.org>,
"Nik Coughlin" <nr******@gmail .comwrote:
dorayme wrote:
In article <13************ *@corp.supernew s.com>,
mbstevens <NO***********@ xmbstevensx.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 effect
that I want is otherwise unattainable. Oh, for multi-browser support of
CSS3!
Indeed, tell you what though: I would at this moment settle for
multi-browser support of CSS 2.1

:)

--
dorayme
Nov 8 '07 #9
dorayme wrote:
In article <13************ *@corp.supernew s.com>,
mbstevens <NO***********@ xmbstevensx.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.
I'll have to trust others reports that it gives them pleasure.

Like the often seen attempts at rounded box corners, it looks
mid-90s kitschy to me, but as you say below, individual choice might
be allowable.
>
>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.
Nov 8 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1710
by: Alex Bell | last post by:
I have a fluid header/two column layout at http://www.members.iinet.net.au/~abell1/test/demo10.htm which works with windows MSIE 5.5 and 6, Mozilla, Netscape, and Opera; and Safari but which crashes with Mac MSIE 5. Rather than try to hack the demo to make it work with Mac MSIE 5 I'd like to find a fluid header/two column layout which will work with this browser, and see if I use alternate css files to make the eventual site work with...
49
2402
by: lime | last post by:
I have addressed most of the issues listed in the responses to my last post "Critique CSS layout (1st go - fingers crossed)". I'm rapt with the progress I have made, thanks to all for your past critiques. http://www.limelightstudio.com.au/iss/8/ The issues addressed: - Nav uses <li> now - No horizontal scroll in IE6 at 850-900 pixels
22
3513
by: Jam Pa | last post by:
Once again my big mouth has landed me with a tough job. I have a static CSS layout, where each and every element has been defined by pixel size - lots of them, too! Mostly relative elements, though. Imagine centered column layout, with a header box, and content box with lots of smaller content boxes of different sizes, some spanning several 'rows' or 'columns'. How would you go about changing this kind of static layout into
19
2554
by: TC | last post by:
Are there any good sites or forums for a web critique? I went to alt.html.critique and it's pretty dead.
26
2099
by: JB | last post by:
Hi All, This is my first go at a pure CSS web site and I'd like your comments and suggestions please. The URL is http://www.waukeshapumps.com/ Comments on CSS, design and content very welcome. Thanks in advance,
12
2389
by: JB | last post by:
Hi All, Is it acceptable to use a fixed width vertical navigation column within a fluid 2 or 3 column layout? Example. Left Column (navigation) fixed width of say 180px Right Column (main content) fluid width to fit rest of window
6
10530
by: Seth Illgard | last post by:
Hi, Im writting a custom CMS and everything looks great, except when I see the results in IE. What im trying to do is: *Have an image in a layer (or relative positioned, or just margined). The exact image's coordinates depends in the window size (Fluid design) *The image should display correctly in front(above) another image (header image)
3
2170
by: akapsycho | last post by:
I'm not sure if this is possible, but I thought that my best shot would be to ask here. My site's coming along well at http://www.antiriddle.com and I'm trying to improve on the current design. The layout I'm trying to do is a three-column layout and my markup looks like this: <div id="contentwrapper"> <div id="leftcontent"> </div> <div id="centercontent"> </div> <div id="rightcontent">
1
1789
by: Nik Coughlin | last post by:
For anyone who's interested, or if you'd like to offer any suggestions or critiques of the finished tutorial: http://nrkn.com/index.html
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10267
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10040
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7463
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4012
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.