Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

(ar0n) Re: PerlMonks XHTML+CSS: an implementation

by ar0n (Priest)
on Feb 25, 2002 at 20:34 UTC ( #147374=note: print w/ replies, xml ) Need Help??


in reply to PerlMonks XHTML+CSS: an implementation

Cool! It's interesting to see what various people trying the same thing come up with.

I've only done three pages, but I'd be quite willing to work with the pmdev team to get the site's markup up-to-date.

The problem is not so much updating the PM code to use xHTML, but rather having our cake both ways: using xHTML while still allowing some facility for those on older/crappy browsers, namely Netscape 4.x.

Right now, we can have xHTML, but can't have it in such a way that it'd be both used in an xHTML-sane way (using div tags instead of tables, etc) and have it not break the current design for icky browsers.

So unless we can get everyone to voluntarily upgrade their browsers to Opera, MSIE 6 or Mozilla .9+ we need to think this through a bit :-)

[ ar0n -- want job (boston) ]


Comment on (ar0n) Re: PerlMonks XHTML+CSS: an implementation
Re 2: (AidanLee): PerlMonks XHTML+CSS: an implementation
by AidanLee (Chaplain) on Feb 25, 2002 at 22:01 UTC

    That is always the issue, isn't it? :)

    I certainly don't have access to the Monastery's web logs, but I have found a few things in my web-work:

    • XHTML itself is a non-issue for older browsers. It is possible to have a completely valid XHTML 1.0 Strict document render in a 4th gen. browser. It's the CSS which is funky.
    • There *is* a subset of CSS that works acceptably in the 4th gen browsers
    • I would hypothesize (and i could be treading on thin ice here) that given the technical audience, the proportion of users with more modern browsers is probably significantly higher than the general web audience.
    • I know that the Perl community tends to avoid political statements, but there are ways to let older browsers down more gently.

    I may post more completely later. I'm off on a road trip :P

    Update (2002/02/26 8:55 AM EST): picking up where I left off

    I'd argue that it is more a question of when rather than of why at this point, as most monks fluent in the web these days understand that such a transition would be a good thing. But do you wait until only 10% of your audience uses a 4th gen browser? 2%? That's vroom's call no doubt, but I'd like to encourage the Monastery to make the transition sooner rather than later.

    As a transition, though I'll admit readily enough that I don't know how the site works, but it might be possible to make the xhtml/css optional by making it it's own theme. I don't know how flexible theming is though. As a theme people could choose whether or not to use it, and then go on to use the new CSS support Petruchio announced recently to style it any way they see fit.

      Greetings,
      I'm all for civic improvement - but at what cost?

      I have an SGI Indy, a Sun 386i and a Linux K6-233mHz PC.
      I would challenge you to run a browser that works smoothly under such conditions other than NetScape 4.7x
      Yes, I know its not a particularly good browser, yes I know it doesn't render much and its Java/JavaScript support isn't so hot... But I don't have much of a choice.
      And no, it definately doesn't work with your CSS/XHTML examples at all.

      So do you really want to stop me reading PerlMonks?

      JP,
      -- Alexander Widdlemouse undid his bellybutton and his bum dropped off --

      I don't care whether the monastery as a whole is at 10%, 2%, or 0.1% usage of older browsers. I care that I am in that portion.

      I personally use an old laptop without sufficient space to install the dependencies for any recent browser, and I am not planning to replace it until at least this summer. (The key dependency being to find out where I am moving so I can decide whether I will get another laptop for the form factor, or whether I will buy a desktop.) If the site is switched over before then, then I will find myself an alternate destination for the web. (Unless, of course, you feel a burning urge to buy me another Linux-compatible laptop. A desktop is not sufficient, I need a laptop for the form factor...)

      So unless the Monastery wants to lose me, it should not break NS 4 compatibility until at least this summer. And that needs to be compatiblity with NS 4 with JavaScript turned off, thank you very much. Which means that it should render usably with no CSS. (Note that usably does not mean aesthetically pleasing. If aesthetics was a burning desire of mine, I would have upgraded a long time ago.)

        (Not necessarily replying to tilly, but my comments pick up where he leaves off).

        My understanding of what those working with the CSS additions have been saying is that they are simply planning on adding CSS classes and IDs to nearly all tags so each aspect of the page can be customized by the end user. The styles that the user can select on their user settings would basic now just switch between different stylesheets that is added to each delievered page, as opposed to hardcoding the FONT, BGCOLOR and other tags in a template file. Positioning would still be done by TABLE layout as no browser including the 6.0 versions does CSS layout well; this is also the area that NS4 had the most trouble.

        Additionally, using <FONT><SPAN>...</SPAN></FONT> (or SMALL, TT, or any other character level tag in place of FONT) would allow CSS definitions to override the FONT settings, but would allow FONT settings to work for those not using CSS or with that specific class undefined.

        The biggest problem is that NS4's CSS support, if used, required that all tags be closed including P's, which can be a major problem since these come from the bulk of the posts here. (It's also very touchy on the format of the CSS, but that's not important here).

        So implimenting the CSS correctly, using only the class and id attributions for any tag, and specifying the style aspects in the stylesheet only, should make the site usable but otherwise bland for all users if no stylesheet is specified, even if they are using NS4, etc; (since basically there are no class definitions, and therefore, no styles to use). Again, pointing out above, we should still rely on Table layouts to format the page (ugh, but that's another issue altogether). Assuming that we can verify that the site works under those conditions under all browsers, then we can start reworking the styles that we currently render the pages as CSS sheets; there should remain a default style that has none and/or minimialistic CSS that is known to work on all browsers. Additionally, we still have the option of the user supplying their own, overriding, CSS.

        I wouldn't expect any problems with the above (using css classes/ids, but no sheet specified), but there might be. If there is a problem with CSS use on any browser, then for the cost of a few additional cycles, it should be possible to implement user-triggered CSS tags that, if a flag is set in the user profile, the tag is otherwise not rendered. EG, using DIV_CSS and SPAN_CSS that either resolve to DIV and SPAN if the user wants CSS, or disappear entirely if not. We may also be able to strip class and id attributes from other tags if this flag is set, such that NO CSS-related tags or attributes are present. Again, the resulting page would be bland but still usable.

        I have not looked yet at the CSS offered at the root of this thread to see how it works, but I suspect based on additional comments that it can be improved. I'll try to take a look in the next day or so and see what can be done such that those using older browsers still get a good experience. Of course, if/when the CSS is finallized, I strongly suggest that it's run on a special virtual/second server for about a week or three to make sure that no one has problems, bugs are reported, etc., so that the current version of the PM HTML remains in tact and uninterrupted.

        Update: I just took a look at the CSS file, and while it appears to do much of what I suggest, it has a big huge 'error' of using the float: attribute. Sadly, as mentioned, CSS positioning is a horrible horrible mess. Years ago, I tried setting up a site with sidebar tables using float, and whatever trick I used, the table failed in one of the major browsers (IE4 PC or Mac, NS4, etc), typically NS4 getting the buzz. I know it would be great to allow people to float these sections but (X)HTML and CSS is just not made for that yet. We need to stick to the main table layout that we have now for this to work. Possibly we can add another variable to the user settings that allows people to put the nodelet bar on the left, but otherwise, leave the tables as they are.

        -----------------------------------------------------
        Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
        "I can see my house from here!"
        It's not what you know, but knowing how to find it if you don't know that's important

        Hi tilly,

        I've seen you bring this point up in response just about every time CSS is mentioned for use at the Monastery, and I can sympathize. You and probably many others are in a situation where these particular tools in the web design toolbox aren't just impractical, they're downright disabling.

        While I usually consider myself to be relatively leading edge in my _knowledge_ of web standards, I know that it is foolish to try to use technologies that are to young to have gained a solid foothold.

        The rest of this post, since I'm going to rant, is no longer directed at anyone in particular.

        CSS has been around since 1996. 7 years is ancient history for most computer-related technologies. So it isn't as if web authors are chomping at the bit to take their shiny new toy out for a test drive. They're sitting there waiting till they can wipe the layers of dust off of this very useful tool without getting their hand slapped.

        I would *hate* to lose any member of this community over something that should be as trivial as the medium through which we communicate. But I would really like to see some progress made in said medium.

        As a comprimise, I think it would be wonderful if we could set up a XHTML/CSS-theme that registered users could optionally switch to. Again, I'd like to volunteer some of my backordered tuits to help make this happen.

        I voluntarily stick with an older browser (NN4) because I'm hooked on Roaming Access, though I fought the move to NN4 and stuck with NN3 for some time. Personally I too do not care so much about explicit "support" (aesthetics) for my older browser as long as it doesn't get explicitly locked out, which of course the monastery would never do.

        As for you browser issue, what platform? If Linux have you tried Galleon? If Windows have you tried K-meleon?

        --
        perl -pe "s/\b;([st])/'\1/mg"

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://147374]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2014-08-21 10:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (133 votes), past polls