Layout situation

  Aug 04, 2002

Hopefully, nobody noticed, but I've been fiddling with my stylesheets, trying to solve a delicate problem.

The problem is that the text of my posts can't be selected properly, not in Internet Explorer anyways. After much experimenting, I found that the problem lies in the fact that I use stylesheets to layout my site.
It is recommended that one does not use tables to layout the page since tables are ment to be used for tabular data, not as a layout tool. Being the generally nice, thoughtful guy I am, I try to comply to webstandards as best I can.

Not entirely unexpected, this endeavor of mine blew up in my face. After thorough testing I've concluded that when I strip the stylesheet of all references to absolute element positioning I can select the text just fine.
It also works well if I only use one absolute positioned element, but then I would have a partly standards compliant layout, and that is probably what I want least of all.

I now have three choices:

1. Keep the page as is, visitors will not be able to select or copy the text properly.

2. Change to a table-based layout structure, to hell with webstandards and folks with disabilities.

3. Find another solution.

Right now, I'm fishing for another solution. But I doubt I will find one, my site is standards compliant, it is the fault of Microsoft's browser that one cannot select the text properly. Nevertheless, it is my problem.

Permanent link

Comments

  1. Meep... ya, I'm having trouble selecting text. And in your comments, too. :)

    Comment by mouse at 05:41, 04 Aug, 2002 #

  2. I've always preferred to have the basic blueprint done in TABLES. Absolute positioning is somewhat irritating, as you said; you can't select text. So, use a really simple, basic TABLE for the positioning of your layout (a left/right will do just fine) and then use CSS for everything else. That's what I do, but on the otherhand; I'm not a webdesigner =)

    Comment by talisyn at 12:14, 04 Aug, 2002 #

  3. What vetrsxion of IE is this? I switched over for a moment and I could select text just fine. (IE 5.something)

    Tali, tables are bad. No, really.

    Comment by Nicklas at 14:29, 04 Aug, 2002 #

  4. Nicklas: I use IE 6.0 myself.

    And Tali, my layout could not be done with a "simple" table layout without using absolute positioning for _some_ elements, for instance the left curly bracket.

    Using tables as means of laying out a page is not recommended at all if one wishes to comply to standards.

    I could use a single table to layout the page and still comply to standards since the contents indeed _is_ tabular data, but then I would have to resort to hacks n tricks to position certain other elements, such as the curly bracket. And hacks n tricks rarely translates well in different browsers.

    Comment by tomas at 16:12, 04 Aug, 2002 #

  5. I gave up being standards compliant :) Being a webdesigner myself, I know that's bad. I use IE 6.0, though, so I bet my page looks awful in Netscape, Mozilla, and Opera... hee.

    Comment by mouse at 21:06, 04 Aug, 2002 #

  6. Ah, come on, you could have done it with tables and put a vspace on the bracket-picture. :) Admit it! You only use css because it's more cool. ;)

    Comment by Tommy at 19:51, 05 Aug, 2002 #

  7. Yeah, you're right, accessibility has nothing to do it. Doh :)

    Comment by tomas at 22:27, 05 Aug, 2002 #

  8. Tommy-san, you just hang onto tables because you're an old-school html-sniper who dislike new and artsy-fartsy things such as css. Tables are useless as they take forever to load as well as the td's and tr's never ever match up.

    Comment by Nicklas at 23:14, 06 Aug, 2002 #

  9. Tomas: Accessability? If you use tables more people, with older browsers, would be able to see your site correctly. You have to think about the dudes with Netscape 2 and IE 3 and... well... Well! (Or does "accessability" mean something else then "access to"? Sorry, but I spent most of my English lessons doing credit card freuds to gain free Internet access.)

    Comment by Tommy at 23:17, 06 Aug, 2002 #

  10. Nicklas: The td's and the tr's always match up! The reason you get it all wrong is because you're not able to do some simple math. Two td gives two /td... Css is still not accepted by all current browsers, and should not be used more then to simple stuff, like setting fonts. Therefore you should never use css to replace tables. I'm not old school, I just want everyone to see all sites! You only let people with fancy-pants IE version one billion on to your site, you fascist.

    Comment by Tommy at 23:24, 06 Aug, 2002 #

  11. Tommy: I don't care about people with _old_ browsers. Like Mark "diveintomark" Pilgrim pointed out, it's been five years, time to fuckin' upgrade.

    Accessibility in this respect is not about serving users of deprecated browsers, it is to serve content accessible by different devices that _comply_ to standards.

    I'm not going to elaborate any further on why table-based layouts are bad, there are plenty of useful resources for that purpose already.

    Comment by tomas at 00:55, 07 Aug, 2002 #

  12. LOL... *amused*

    I don't know, I use both CSS and tables. Go figure. It looks fine on my browser, that's all that matters to me! ;)

    Comment by mouse at 09:17, 07 Aug, 2002 #

  13. Tables... Oh my.
    Hey, 1994 called... They want their website back.

    Comment by plank at 12:36, 07 Aug, 2002 #

  14. Tommy, you deflated balloon creature. IE handles css like a child drives an eighteen wheeler truck: recklessly and without thought or control. It is the Netscape 4 of the century. By using tables, you keep Bill Gates at the top as well as reinforce the mathematical Excel formulas that sneak into our brains. Besides, tables are so 2D and paperlike. Internet is not about paper (even though it is a thought I guess.) All advertising burritos that turn into web designing use tables. Can you live with that?

    Comment by Nicklas at 13:04, 07 Aug, 2002 #

  15. Nicklas: quite a good analogy, since IE also dominates the street due to sheer size and force.

    It's, nevertheless, the best browser in my mind though, much because it's polished compare to Netscape and Opera, and it feels just like the rest of Windows.

    Comment by tomas at 13:12, 07 Aug, 2002 #

  16. Nicklas: Well, my dear stupied little friend, what you're saying is that IE, which almost everybody uses, sucks at css. That's a really good reason *not* to use css. Or perhaps you would like to see that all surfers are using that horrible annoying Opera? Tables are not more 2D than css, because of the simple fact that our monitors are 2D! Maybe you haven't noticed this, inside your cute bubble of life, where you seem to spend all day ignoring the real world and masturbating to shitty photographs of the Clan Of W3.org and Jacob Nielsen. Clean your glasses, shave your ass and step outside for a moment!

    Comment by Tommy at 13:40, 07 Aug, 2002 #

  17. Tommy:

    1. This site uses CSS, so does Nicklas'. Both our sites also look as intended in IE, thus your point is moot.

    2. Hold your horses.

    Comment by tomas at 14:33, 07 Aug, 2002 #

  18. Beeing the asshole I am, I keep wondering why your companys web site are designed with tables instead of css, like your personal page? ;-) Well. I like css and I like tables. The only reason I was acting like a jerk to Nicklas, is that I like acting like a jerk to Nicklas. That's my job... We'll record a song titled "css versus tables" some saturday.

    Comment by Tommy at 14:48, 12 Aug, 2002 #

  19. I was waiting for that one :)
    Basically, with this site I don't give a rats ass about visitors with "old" browsers.
    With the business site, I want it to degrade more gracefully than a completely CSS-built site does. Having said that, it does need an overhaul to reach that goal satisfactorily.

    Comment by tomas at 15:08, 12 Aug, 2002 #

  20. Interesting.

    1. CSS is cooler than tables, most people have worked that one out.

    2. The point about your company site is amusing too. I had noticed that in the past ;)

    3. In the end as long as the information is there and the majority of viewers can read it does it really matter how its coded?

    Comment by cyberhill at 12:10, 11 Dec, 2002 #

  21. Cyberhill: It does matter how it's coded, because "bad" (table-based, or worse; frames-based) code is semantically inaccessible, i.e the markup-structure does not equal the site-structure.

    You might not think you've got very many blind/disabled users for which accessibility is key, however, google and all other spiders/robots etc, are all blind.

    Comment by Tomas at 12:19, 11 Dec, 2002 #

  22. Fair points.

    I've been converted after reading a few sites talking on this issue ;)

    My new site attempts to use css, there are no tables or frames. However being my first attempt it's not quite valid yet. When i have some more spare time i'll get into it again so that it is finally valid.

    Comment by cyberhill at 08:27, 28 Jan, 2003 #

  23. Glad to hear that cyberhill ;-)

    Comment by Tomas at 08:57, 28 Jan, 2003 #

  24. hmmm... is the text selection problem due to an errant ' in the meta tag, from the source of this page:

    <meta http-equiv="Content-type" content='text/html; charset="iso-8859-1"'/>

    see the extra ' before the slash? maybe you meant to do that. is it some kind of tricky trick?

    anywho.

    Comment by hezair at 16:47, 09 May, 2003 #

The discussion has been closed on this entry. Thanks to everybody who participated.