|
Posted by Andy Dingley on 11/09/07 09:51
On 8 Nov, 17:52, mbstevens <NOXwebmast...@xmbstevensx.com> wrote:
> 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!
Navigation:
[Reply to this message]
|