Follow Slashdot stories on Twitter


Forgot your password?
typodupeerror News

Slashdot HTML 4.01 and CSS 748

After 8 years of my nasty, crufty, hodge podged together HTML, last night we finally switched over to clean HTML 4.01 with a full complement of CSS. While there are a handful of bugs and some lesser used functionality isn't quite done yet, the transition has gone very smoothly. You can use our sourceforge project page to submit bugs and we'd really appreciate the feedback. Thanks to Tim Vroom for putting the HTML in place, Wes Moran for writing the HTML in the first place, and Pudge for writing the code to convert 900k users, 60k stories, and 13 million comments to comply. And for the brave, download the stylesheet and start experimenting with new themes and designs for Slashdot: some sort of official contest to re-design Slashdot is coming soon, so you can get a head start now.

Response to some reader notes in the forum:

  • There are a handful of validation errors. Some will be fixed in the next day or so. Others are external HTML that is out of our hands. We may never toally validate with zero errors. yes we're comfortable with that.
  • We're not going to XHTML for the same reasons as above- we control almost all of our HTML, but some of it (like the ads, and imports from other sites) just isn't ours to muck about with. We could go to XHTML, and someday we might, but today we're happy to just get to HTML 4.01 and CSS.
  • Light Mode will be back in some form or another. The problem is that light mode served two purposes: Low Bandwidth, and Simplified Design. The later will probably be handled with a CSS theme (we have a handheld theme already). Low Bandwidth is a little trickier, but we will resolve that soon.
  • All of our code is beta tested on and Unfortunately there's always a few issues from those tiny tiny sites and the giant bohemoth that is Slashdot itself.
This discussion has been archived. No new comments can be posted.

Slashdot HTML 4.01 and CSS

Comments Filter:
  • So that is why (Score:1, Interesting)

    by Misagon ( 1135 ) on Thursday September 22, 2005 @10:21AM (#13621208)
    ... slashdot does not work with Netscape 4 when I try it today.

    I tried it because of a gnarly bug in Opera, requesting pages from the wrong sites....
  • Testing process (Score:3, Interesting)

    by FortKnox ( 169099 ) * on Thursday September 22, 2005 @10:21AM (#13621209) Homepage Journal
    Why don't you guys have a formal testing process in place for slashcode?

    Seriously, its like every Thursday morning its a big test to determine how many '503 Service Unavailable' we will get.

    If this was done in a real web app environment, you'd guys wouldn't have your cushy jobs, ya know...

    Having said that, I get a 500 error randomly on any post...
  • by jandrese ( 485 ) * <> on Thursday September 22, 2005 @10:22AM (#13621223) Homepage Journal
    Although the Slashdot guys have blocked it again, there was a short time this morning where the validator could get through. It showed the main page as validating Ok for the most part, but some of the sidebars (especially the Freshmeat sidebar) as failing miserably. Just looking at the source doesn't give me a headache anymore though, which is a massive improvement.
  • Getting There... (Score:5, Interesting)

    by lukewarmfusion ( 726141 ) on Thursday September 22, 2005 @10:24AM (#13621257) Homepage Journal
    I'm glad to see the improvements. I was surprised to see a couple of the pages loading much faster and my text-size was slightly decreased from the previous version. Looking under the hood, I saw that the move was made. However, there are a few items I noticed (I'll submit to the SF page as appropriate)...

    Validator says it's not correct Strict. There are 13 errors. Some areas still have FONT tags and whatnot, but I don't know if those are includes from external sites (and therefore out of /.'s hands).
    <font size="3" color="#006666"><b>Search Freshmeat:</b></font><br>
    Anyway, I'll be working on an alternate design right quick. I also expect to see a Firefox extension to load up a custom Slashdot stylesheet (and maybe a /. styles database site to find good ones).

    Welcome to the 21st Century.
  • Count on 'Em (Score:5, Interesting)

    by Doc Ruby ( 173196 ) on Thursday September 22, 2005 @10:27AM (#13621305) Homepage Journal
    Can we get some stats APIs? Like per-story counts of unique repliers (+/- ACs), broken down by point score, with metadata (date/time posted, categories, submitter ID, "author" ID). And links in the story, and comments (per point score)? How about some karma details?

    I'd like to see a Slashdotter make an app that shows trends of posting results. And an app that draws networks between posters, destinations, categories, etc. Let's rub Slashdot's soft green underbelly!
  • by justforaday ( 560408 ) on Thursday September 22, 2005 @10:31AM (#13621356)
    Using Opera's validate option, it still fails as HTML 4.01 Strict. However, the number of errors are in the low double digits, which is an enormous improvement over the hundreds the old code would give.
  • by garcia ( 6573 ) on Thursday September 22, 2005 @10:33AM (#13621381)
    did some testing with a FireFox version I *know* contains the infamous "Slashdot bug". (Not sure if it's corrected in recent versions since I normally use Mozilla or Safari.)

    Well they fixed it for Firefox but they added it in for IE (purposefully probably). I've seen it twice now.
  • Impact on Bandwith? (Score:5, Interesting)

    by fons ( 190526 ) on Thursday September 22, 2005 @10:40AM (#13621454) Homepage
    I would be very interested to know wheter this change has a big effect on the slashdot bandwith usage.
  • Not according to the W3C (world wide web consortium) validity checker []! It finds a number of errors on all the Slashdot pages I've checked. The CSS passes as valid though.

    Since HTML 4.01 strict and XHTML 1.0 Transitional are so close, only minor differences really, you could easily make Slashdot XHTML 1.0 Transitional.

  • by goodEvans ( 112958 ) <> on Thursday September 22, 2005 @10:50AM (#13621544) Homepage
    I have Firefox with the excellent Web Developer [] extension installed. This lets you edit and change CSS on the fly, amongst other things. Each of the sections (games, apple, IT etc) seem to have their own CSS overlay. Kill that, and the page reverts to standard green.
  • Re:Stylesheet? (Score:5, Interesting)

    by josephgrossberg ( 67732 ) on Thursday September 22, 2005 @11:01AM (#13621633) Homepage Journal
    I also recommend that people start sharing their own user-defined stylesheets (like they've done with Gmail []), so this site no longer looks like crap.

    Like a CSS Zen Slashdot.
  • by sn0wflake ( 592745 ) on Thursday September 22, 2005 @11:29AM (#13621839)
    Was it really a bug in Firefox that made /. render incorrectly? AFAIK /. didn't conform to the W3C HTML standard anyway and all other pages on the web rendered fine. Anyway, I'm very pleased to see the new code and maybe I'll even submit a CSS. Would have preferred XHTML though.
  • Holy Shit! (Score:5, Interesting)

    by Anitra ( 99093 ) <> on Thursday September 22, 2005 @11:36AM (#13621887) Homepage Journal
    Ever since the November 2003 article on A List Apart [], I've been wondering if this day would come. Almost two years later, it looks like it's finally here!

    Having worked on smaller sites, I can imagine how difficult this change was. I took a quick peek at the code; it's so much cleaner now, and it loads so much faster! Congratulations, guys.
  • by Koiu Lpoi ( 632570 ) <`koiulpoi' `at' `'> on Thursday September 22, 2005 @11:54AM (#13622041)
    On my Pocket PC, slashdot looks orders of magnitude better (I never use the /palm one, I like my images!). However, in PIE it needs to be set to 1 column mode. But, I feel very glad that I can get a decent looking news aggregator on the go without having to scroll nastily.
  • by pudge ( 3605 ) * <> on Thursday September 22, 2005 @11:57AM (#13622067) Homepage Journal
    This was done awhile ago, and almost no one noticed.

    Basically, we were allowing various things in comments for years that were not compliant with HTML 4.01 strict. Even moreso for stories. So about six months ago we fixed the code to force compliance with HTML 4.01 strict, and about two months ago converted old content accordingly.
  • by raygundan ( 16760 ) on Thursday September 22, 2005 @12:15PM (#13622219) Homepage
    The great thing about light mode's compromise was that I could just leave it enabled and use it on both the desktop and the mobile device. Currently, I have the following options:

    1. The whole shebang: all the functionality, all the bandwidth.
    2. Light mode: no slashboxes, less bandwidth. It's not bad for mobile, but now that it's not full-functionality, I can't leave it enabled all the time.
    3. /palm mode: only shows the top 5 comments. hardly even qualifies as slashdot! Not a useful thing unless you're on a *really* stripped-down device.

    What I'm missing now (a fire-and-forget way to get full functionality on the desktop but lower bandwidth and all the comments on the phone) can be fixed one of several ways:

    1. A way to set my preferences to be different for mobile and desktop browsers.
    2. A full replacement for light mode, with all the site functionality
    3. A more complete mobile mode with all the comments present.

  • by ChristTrekker ( 91442 ) on Thursday September 22, 2005 @12:17PM (#13622233)

    I once tried cleaning up a site with lots of tables and inline formatting, converting it to CSS. Stripping the formatting down saved roughly 15-20% on that site the more pages were visited using the cached stylesheets. If you only visited the front page, the bandwidth usage was actually a bit higher. It all depends how much inline formatting you have, but I thought 15% was significant enough to make the effort for, especially if traffic (hence bandwidth expense) is high.

  • Sickening (Score:1, Interesting)

    by ArchAngel21x ( 678202 ) on Thursday September 22, 2005 @12:35PM (#13622391)
    All the brown nosing commments are getting good marks while constructive criticism is shot down as flame bait. I agree that if you are going to put all that work on the backend of the web site (the code), you might as well improve the GUI too. While we are on the topic of improving the site, how about putting in a spell checker?
  • by Rei ( 128717 ) on Thursday September 22, 2005 @12:42PM (#13622453) Homepage
    The page may look better in Mozilla, but it's god-awful in konqueror. I was wondering what on Earth slashdot did to make things look so horrible. The teal article header background now takes up over an entire page for the first article on the page (including in comments view). The input boxes are now way to spaced out - it looks like below (only worse):

    -- Edit Comment ----

    Rei (Log Out)

    URL []

    Re:Kudos on a great upgrade

    Use the Preview Button! Check those URLs!

    * No Karma Bonus * Post Anonymously

    Plain Old Text Preview Submit

    Really, it's barely usable. It looks horrible.
  • by waffle zero ( 322430 ) on Thursday September 22, 2005 @12:43PM (#13622468) Journal
    Site specific CSS is already in Firefox 1.5 Beta 1. To overide any page styles for slashdot you could place the following in your userContent.css file:
    @-moz-document domain(
    /* CSS rules here apply to:
        Any page whose URL's host is or ends with
    For more info see: Aug/0135.html []
  • by jaiyen ( 821972 ) on Thursday September 22, 2005 @12:44PM (#13622474)
    But he bought it on ebay []
  • Re:HTML 4.01?! (Score:4, Interesting)

    by Anitra ( 99093 ) <> on Thursday September 22, 2005 @12:52PM (#13622572) Homepage Journal
    Did you even read what CmdrTaco wrote? They have a reason NOT to go to XHTML, at least for now. But he leaves the possibility open.
    We're not going to XHTML for the same reasons as above- we control almost all of our HTML, but some of it (like the ads, and imports from other sites) just isn't ours to muck about with. We could go to XHTML, and someday we might...

    There are several browsers (and other tools, like XML parsers) out there that will break if an XHTML format doesn't validate as perfect XML. Since Slashdot does not control all of the code they pull in (especially ads, but also comments - neither of which are guaranteed to be valid XHTML), they want to play it safe.
  • by temojen ( 678985 ) on Thursday September 22, 2005 @01:10PM (#13622731) Journal

    If you want to clean up your code more, all the menu items are anchors wrapped in list items. this can be much cleaner styled as:

    //should be in an attached stylesheet, not inline span { display: block; background-color: green; } a { display: block;}

    <div class="menu" id="about">
    <a href="/supporters.shtml">Supporters</a>
    <a href="/code.shtml">Code</a>
    <a href="/awards.shtml">Awards</a>

    As compared to:

    <div class="block">
    <div class="title" id="links-about-title">
    <div class="content" id="links-about-content">
    <a href="">Suppor ters</a>

    <a href="">Code</a>
    <a href="">Awards</a>


    BTW, nice use of fieldset.

  • by SoloFlyer2 ( 872483 ) on Thursday September 22, 2005 @01:32PM (#13622903)
    The First 20 Slashdot (85645) users:
    CmdrTaco (1)

    Hemos (2)
    drendite (3)
    CowboyNeal (4)
    samzenpus (5)
    jgoldsch (6)
    CLorox (7)
    Emmett Plant (8)
    keith (9)
    ximenes (10)
    velkro (11)
    RAD Kade 1 (12)
    TechNoir (13)
    Christopher Bibbs (14)
    DeadBeef (15)
    Tom Rothamel (16)
    Rolf W. Rasmussen (17)
    davidu (18)
    steffenz (19)
    Robogoatgruff (20)
    and some other intersting user numbers :)
    Bill Gates (156)

    Microsoft (9967)
    Windows (452268)

    Linus Torvalds (128589)
    Linux (40410)
    Debian (27049)
  • by generalpf ( 127112 ) on Thursday September 22, 2005 @03:28PM (#13623920)
    Up for a case of beer or two? Come on, these guys left the crappy HTML languish for EIGHT YEARS before updating their site -- during which time they obviously don't even read their own site -- and you think they deserve a reward? They're getting paid to run this site!

    I wish I could work two days every eight years and get a case of beer for doing MY JOB.
  • by ATinyMouse ( 703798 ) on Thursday September 22, 2005 @03:58PM (#13624195)
    Interesting, it appears that UID 666 isn't owned by anyone, yet searches for 665 (patfu) and 667 (Naikrovek) work.

  • Re:Wrong date?! (Score:3, Interesting)

    by Blkdeath ( 530393 ) on Thursday September 22, 2005 @04:14PM (#13624344) Homepage
    When are they going to open source the conservation principle defying karma algorithm? I have a couple hundred posts under my belt. Without a detailed statistical analysis I hit a +5 every 5 or 6 posts with many making +3 or +4. I regularly metamoderate...

    You probably post too frequently or not frequently enough. Myself, I MM about 1-2 times/month when I'm bored. I read /. daily and post only occasionally, usually in a week I'll have a day where I'll post 4-5 comments then no more. I also have Excellent Karma and 95% positive MM score. I get mod points probably twice a month if not more.

    This is mostly detailed in the FAQ, but basically they have a profile of their ideal moderator and apparently I'm it. :)

"Well, it don't make the sun shine, but at least it don't deepen the shit." -- Straiter Empy, in _Riddley_Walker_ by Russell Hoban