[sclug] CSS

David Given dg at cowlark.com
Thu Oct 20 10:42:33 UTC 2005


On Thursday 20 October 2005 10:59, Jonathan Leighton wrote:
> On Wed, 2005-10-19 at 19:05 +0100, David Given wrote:
> > Unfortunately, CSS is the only game in town if you want web pages. (I
> > periodically wonder about how feasible it would be to do your layout
> > using Javascript to modify the HTML code, which ought to let you do
> > things that CSS can't do, but nothing ever comes of it.)
>
> That would -- of course -- be completely and utterly inaccessible. And
> it's not what Javascript is for anyway.

If Javascript's not turned on, of course, you get the unmodified original 
HTML, which should be perfectly readable *without* any Javascript fiddling. 
(Just like HTML is supposed to be readable and accessible without any CSS 
fiddling.)

With regard to the other issues you brought up --- basically, I have a noddy 
website with a two-column layout: http://www.cowlark.com/master-index.html. 
Note that the left-hand column is sized according to the logo at the top. The 
*only* way I've found to do this is to use the table rendering algorithm, and 
even so it's not particularly reliable.

If I were to give the column a fixed size expressed in ems, that wouldn't work 
because the logo's in a proportional font --- twelve characters is not twelve 
ems wide. If I were willing to have whitespace there, then that would be an 
acceptable solution (and one I need to remember in the future), but I don't 
want to do that.

Given that I have to use table rendering, I could replicate TABLE using the 
CSS table rendering tags. But why bother? If I did that, I'd still have to 
have layout information in the HTML anyway --- because I'd still need 
elements equivalent to TABLE, TR and TD because that's the way the CSS table 
rendering stuff works --- and if I'm going to do that I might as well 
actually *use* TABLE, because it'll work across a greater variety of browsers 
and it's less work.

[...]
> "most CSS-based column layouts end up having to make some of the columns
> a fixed size simply to make them work properly" -- no, most fixed width
> CSS layouts are that way because one or more images are used that would
> look stupid if the rest of the page was wider than the image. Fluid CSS
> layouts are perfectly possible.

Slight clarification here: 'fixed size' includes percentage sizes, em-based 
sizes, etc. What I meant is that you can't simply let the browser determine 
the most appropriate size, the way you can if you use tables. Additionally, 
if you use tables, you can use hacks such as padding images to tell the 
browser not to make the column narrower than a certain width, which is an 
extremely useful feature needed to make truly resizable layouts.

I suspect this is getting rather off-topic.

-- 
+- David Given --McQ-+ "I love the way Microsoft follows standards. In
|  dg at cowlark.com    | much the same manner that fish follow migrating
| (dg at tao-group.com) | caribou." --- Paul Tomblin
+- www.cowlark.com --+ 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.tmdg.co.uk/pipermail/sclug/attachments/20051020/974b854a/attachment.bin


More information about the Sclug mailing list