Critique, image slicing for fluid CSS layout tutorial

A

Andy Dingley

I would resist using the kind of code here
because I would not want to maintain it, and I just find its appearance
unneeded aesthetically.

What do you mean by "appearance" ? Appearance as finally rendered on
the page, or appearance of the source code, as a rather specialised
aesthetic view by a code guru?

As simple example, you can code "a picture gallery of blocks" as
either a <table> or as floated <div>s. When rendered, the floated
<div>s are considered "better", as they give a more flexible and fluid
rendering. Looking inside the source though, there's a problem in how
to achieve this: it _does_ require more coding. It requires more CSS
and more HTML. In particular, there's a trade-off in how you clear-
down after a sequence of floats. This can be (sometimes) done by
complex and non-robust work in CSS selectors, or more simply and
reliably overall by adding a sprinkling of extra (but justifiable)
HTML elements.

So which do you prefer? I'm not a great fan of additional HTML
elements to clear up after floats, but how else are you going to do
it? De-evolve the design back to a <table>? Use tricksy CSS that
really is hard to understand? Sloppy work with a ragged bottom edge?
Or do it simply, cleanly and correctly, even if it's a little more
verbose? I know which I prefer.

"Divitis" is a hard condition to diagnose, and it's prone to excess
mis-diagnosis. The number of HTML elements should (as a general
principle) be kept to the minimum that are useful, but not reduced any
further!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top