bite the CSS bullet

Story: A new look for LXerTotal Replies: 12
Author Content
mojavelinux

Oct 07, 2004
2:51 PM EDT
Dave, please take this as a helpful suggestion from a user who wants to see lxer.com be the best it can be. I think it is time to bite the CSS bullet and go tableless (or mostly tableless) with lxer.com.

Many people (http://www.alistapart.com/articles/practicalcss) reached this epiphany and been extremely satisfied with the result. Besides, there are extremely compelling reasons to do so that align with the goals of lxer. It makes theming more flexible, it makes pages more accessible to text-based and mobile devices, it reduces the size of the pages, and it helps them to be indexed and scraped better (since tags are more semantic, just be sure to make liberal use of the "id" attribute). I could point you to various sites, but you would find them just as easily with google. csszengarden.com is the staple first move.

If you feel you are too busy, I encourage you to enroll this task in a challenge for lxer visitors. Given that the site is not very busy, though, it probably wouldn't take too long to do.

Good luck!
tzafrir

Oct 07, 2004
7:01 PM EDT
One immediate goal: client-side themes. Take a look at, e.g., http://kde.org/ .
dave

Oct 07, 2004
7:07 PM EDT
The trouble is, there is still a percentage of users who use Netscape 4. Have you ever tried looking at those table-less websites in NS4?

dave
rob

Oct 07, 2004
10:44 PM EDT
I like it. Very nice...clean...I'll keep this for now.
techieMoe

Oct 08, 2004
5:03 AM EDT
Ah. So *that's* what was different. I just couldn't put my finger on it... :P
mojavelinux

Oct 08, 2004
8:53 PM EDT
Dave,

I don't want to strike a bad note here, but I really, really think the Netscape 4 argument is a dead horse. In fact, they buried it and there was a funeral.

Regardless, CSS based sites look better in Netscape 4 than any other modern site. The idea is to use a CSS directive that Netscape 4 won't understand (like @import) and Netscape 4 users will get the default/no theme version. Take a look at my website http://www.mojavelinux.com or "A List Apart" http://www.alistapart.com with styles turned off. You will see that they look very acceptable. Granted they will only layout with the raw html style, but the semantic aspect IS delivered. To me, it is a very acceptable tradeoff. Styles are only meant as a decorator, playing little to no role in the content delivered.

Again, I am not saying to forget Netscape 4 users. What I am saying is consider the semantic aspect of your site to be of higher importance than supporting an antiquated browser. There isn't a reason in the world that people should still be using Netscape 4 anyway. So give them what they ask for, an old style of rendering, the default styles of html. I don't see how one can disagree with this argument.
dave

Oct 09, 2004
3:09 AM EDT
Hi mojave, no bad note here. :) Your arguments are good, and after all, this is a tech site, not a gardening site. Maybe I could stop worrying about the NS4 users. I'll give it some thought over the weekend, okay?

dave
Void_Main

Oct 09, 2004
4:25 AM EDT
I think those sites look very nice but I don't understand why the latest trend seems to be to waste so much space on the left and right side of the content. Why not use that space? It's almost like people are trying to make the page look like it's printed on a piece of paper. Even the LXer site is like this, but not nearly as bad as some. Then when I run in 1600x1200 mode like I normally do at work some of these sites have this little strip of content and a sea of blank space around them (not all sites are like that). I like to run in higher resolution so I can pack in more content (not just web content). Just thinking out loud...
AnonymousCoward

Oct 09, 2004
7:30 AM EDT
Dave, the hardcoded <font color="#008000"> snippet makes it kinda hard to work with my favourite background colour. Could you start the CSS revolution by simply turning that into a <span class="subhead"> or something like that with a matching CSS stanza?

Also, &lt; and the like works in forms, but gets taken out of the submitted text during previews (turned into '<'), forcing a preview, fix entities, preview loop if one wishes to post anything with a less-than sign in it. Please fix.
dave

Oct 09, 2004
11:24 AM EDT
The former is definitely do-able. It's require that I get into the code and make the change, and that's the easy part. The hard part is updating all the websites that use this code (which is a little over 350 sites). In time I'll make this happen.

The latter is caused by the PHP function htmlentities() being called upon Previewing your work. It's not really a bug that you are describing, but rather undesirable behavior. Do you have a better idea? The & needs to be changed to & amp ; and how do you know that the ampersand is not part of an entity? It's a difficult situation that as far as I know has not been solved.

dave
AnonymousCoward

Oct 09, 2004
6:08 PM EDT
Give us a whistle when LXer.com has had the first change rolled in, and I’ll complete my low-eyestrain theme by way of testing it.

As to the second, since this is the contents of a <TEXTAREA> we're talking about, you should never touch the “entitiness” of it except to actually output it. If the user does no preview, that's their problem. For the first preview with an entity, you might want to drop a warning line above the <TEXTAREA> Just In Case, but that’s as far as I’d go by way of processing the actual preview text.

This post uses &ldquo;, &rsquo; etc for quotes and apostrophes, and they’re translated to the correct (well, functional) printable characters in the first preview, then mutated into “?” in the second preview (and presumably also in any followup post). That’s not useful behaviour.
dave

Oct 10, 2004
3:57 AM EDT
I just checked, and in fact I am not using htmlentities on the text before putting it into the textarea box. Your browser is converting the stuff into entities on your behalf. I don't know if there is anything I can do (short of a hack to stop your browser from doing it)

dave
dave

Oct 10, 2004
4:32 AM EDT
Quoting:Dave, the hardcoded snippet makes it kinda hard to work with my favourite background colour. Could you start the CSS revolution by simply turning that into a or something like that with a matching CSS stanza?


This is finished. It's tr.newswire_byline.

best, dave

Posting in this forum is limited to members of the group: [ForumMods, SITEADMINS, MEMBERS.]

Becoming a member of LXer is easy and free. Join Us!