Sunday, October 10, 2004

Keyboard navigation on Original, CSS rant

I finally managed to fix the remaining issues in my modified original, and as a bonus I added keyboard navigation on the preview screen.

Keyboard navigation makes it soooo much handy to skip to the next/previous photos, but I wondered for a while about how to inform the user that she can use the keyboard, as right now, keyboard navigation on the web is so underused, that it even feels weird to just press the right arrow to skip to the next picture.

I decided to add little explicit hint on the webpage saying that you can use the arrow keys, and to make it disappear when the user starts using the keyboard. All that coupled with a little bit of javascript magic to store if we should show the hint in a cookie, and we're done.

While I was at it, I also removed the alternative stylesheets, because it made the code that managed the cookies a bit harder, and I wanted to remove them anyway, as I didn't know how well they played with the new html.

I will call it a day.

Oh, I almost forgot...

<rant>
I am, as anybody, jumping in the CSS bandwagon. Pages are smaller and presentation is much more separated from HTML than when you layout with tables.

But it certainly is not the best thing since sliced bread.

The whole goal of CSS is to be a language where you can specify the layout and the look of HTML elements. It fails short on the look part, and it's a disaster on the layout part.

While you can certainly work out alternative layouts to a web page (Zen Garden probably being the famoust example), the language is certainly not stellar at doing it.

I will bet that, without reading in Internet how to do it, and with a good knowledge of CSS, you will not be able to layout a simple page, with just a header, footer and a left band. In fact, the best you can do is something that looks like this layout, carefully using a background image on certain areas to give the impression of this layout to the user.

Thing are so bad, that you will even have to change the logical HTML, adding some spurious div's to make it work on all browsers. If I find something like this in a computer program, I will call it on a blink of an eye a hack.

These layouts (2 columns, 3 columns, etc.) are so hard to discover, that when you come with a way to do it, you're internationally aclaimmed, articles are written and much (virtual) ink flows about it. And that's the thing CSS was supposed to do so well.

It is embarrassingly easy to do the same layout using (horror!) tables.

On the look side, things definitively look better. You can change
much easily than before the look of your page using HTML, but it also makes it ring a bell in my head when I see the proliferation of ad-hoc'ist pseudo-classes in CSS, to specify the dynamic look of some elements to get a pale imitation of what we can do right now with JavaScript (and I will be complaining much harder if cross browser JavaScript was less painful).
</rant>

9 comments:

Thủ thuật smartphone said...

thực phẩm chức năng tăng trưởng chiều cao của Nhật
thuốc làm tăng chiều cao
bí quyết tăng chiều cao ở tuổi dậy thì

Tuyết Nhi said...

Nice post, I want to read more
http://phuongphaptangchieucao.info
http://tangchieucaohieuqua.info
http://thucdontangchieucao.net
http://thucdontangchieucao.org
http://canxi-nano.com
http://thucdontangchieucao.com
http://nano-canxi.com

Khánh Lê said...

So good ! Can u visit my site ?
http://thuoctangchieucao.org/
http://www.tvbuy.vn/tang-chieu-cao/nubest-tall-usa-thuc-pham-tang-chieu-cao-cua-my

Lan Trần said...

Nice article
http://mythuattranvuong.com
http://comingback.info

Khánh Lê said...

Tham khảo thêm các loại sữa tăng chiều cao cho người lớn ở tuổi trưởng thành tại

http://www.kienthucsongkhoe.net/2017/08/cac-loai-sua-tang-chieu-cao-cho-nguoi-lon-truong-thanh.html

http://www.tvbuy.vn/bat-mi-3-loai-sua-giup-tang-chieu-cao-hieu-qua-cho-nguoi-lon

Tuyết Nhi said...

Visit my site: https://quoctehoanmy.com

Khánh Lê said...

https://toacotthong.com

http://www.tvbuy.vn/cach-tang-chieu-cao/dung-thuoc-tang-chieu-cao-o-tuoi-truong-thanh-thuc-su-co-tac-dung-174

グエン ユイウィ said...

Chuyên cung cấp thuốc tăng chiều cao https://tvbuy.vn/nubest-tall-usa-thuc-pham-tang-chieu-cao-cua-my đã được bộ y tế công nhận và cấp giấy phép lưu hành toàn quốc, thuốc chữa trị sa tử cung https://satucunghoada.com hiệu quả 100% thảo dược thiên nhiên. thuốc điều trị các bệnh về xương khớp tọa cốt thống https://toacotthong.com/ bột neem ấn độ đẩy lùi hiệu quả mụn, chất nhờn, mang đến làn da trắng sáng, an toàn tuyệt đối http://congtymethi.vn/bot-neem-an-do.html  Nhung hưu tươi Với khả năng kích thích tăng trưởng và tái tạo tế bào, thúc đẩy quá trình làm lành vết thương, cải thiện chất lượng đời sống tình dục http://congtymethi.vn/nhung-huou-tuoi-thai-lat-50gr.html Nho khô nguyên cành đem đến cho bạn nguồn năng lượng dồi dào cho cơ thể http://congtymethi.vn/nho-kho-nguyen-canh-500gr.html Hạt đười ươi hay còn gọi là hạt ươi bay có vị ngọt thanh có tác dụng thanh nhiệt giải độc gan làm mát bên trong cơ thể http://congtymethi.vn/hat-duoi-uoi-500gr.html quả macca một loại thần dược của các thổ dân châu Úc, có nguồn gốc từ những cánh đồng rừng rậm cổ xưa của Australia http://congtymethi.vn/hat-macca-hat-mac-ca-500gr.html Hạt Methi Ấn Độ có khả năng hạ đường huyết vô cùng tuyệt vời, lại rất an toàn cho sức khỏe nên đang được xem là niềm hy vọng mới trong quá trình điều trị lâu dài cho người bệnh tiểu đường http://congtymethi.vn/ha-duong-huyet-hieu-qua-bang-hat-methi-an-do.html

thanh minh said...

Visit my blog:
gameonline
trangtrinhabep