• LCrawford (unregistered)

    This is the frist thing we can expect when deprecating the simple CENTER and VALIGN attributes.

  • Prime Mover (unregistered)

    So is that adjustment of the width cumulative or is the operation idempotent?

  • RLB (unregistered)

    There's gotta be a reason why our core web technologies settled on these weird languages that don't neatly fit and feel as if they weren't designed so much as just happened

    Yes, there is. And that's because that is what happened. HTML 1 was designed, HTML 2 was bastardised by Netscape, HTML 3 was gone over like a blonde on a casting couch by Microsoft, HTML 4 was designed by committee using several ideas that individually would have been good but put together weren't, and HTML 5 is constantly being ac- and decreted and that will never stop.

    Rinse and repeat for JS and CSS, mutatis mutandis.

  • Robin (unregistered)

    I'm pretty sure nesting a div inside a span (even once, let alone hundreds of times) is invalid HTML. (OK I just googled, it seems it's not technically "wrong" but still considered bad practice.) It probably looks OK in most/all browsers, as they're designed to be tolerant of malformed markup - but it still shouldn't be done.

  • Scott (unregistered)

    If browsers stopped displaying invalid HTML I think there would be maybe 6 visible web pages on the entire WWW, all of them saying "Hello World".

  • MiserableOldGit (unregistered)

    That adjusting the width by one pixel thing rings a bell of being a cludge to fix browser compatibility issues. Back in the good old bad old days a good proportion of effort with HTML and CSS went into adding all sorts of conditional tweaks so it would behave nicely in the browsers (and versions of browsers) in use in the noughties.

    Apparently this was better than our old cludge of shoving everything in nested tables ... well of course it was, but I never came across a Marketing department that understood how simple it was to switch a CSS to get practically any look you wanted, they would always prefer to add a couple of zeros and 6 months to the plan and have it all rebuilt from scratch.

    My guess is that weird HTML was generated by some odd integration with a content manglement system, I've certainly seen plenty where code was pulling some text dump out of a horrible apple design package, stitching HTML and JS (or even JSP) all over it, shoving it backwards and forwards through a database before vomiting it out onto the web site. Normally that should be kept clear of the versioning, but not always, and if it goes past a developer who doesn't really understand HTML (or doesn't give a shit), well in it goes. Happens when you let departments go out buying shiny new toys and there's a heap of legacy crud to integrate with and they are dumb enough to believe the salesman's promise that it will go swimmingly (but don't mention it to IT, they just complicate things).

  • The Incredible Holk (unregistered) in reply to Scott

    Most oft these 6 sites would use an incorrect Character encoding.

  • Naomi (unregistered) in reply to Robin

    OK I just googled, it seems it's not technically "wrong" but still considered bad practice.

    I'm curious where you found this. As I understand it, a is an inline element and so may not contain block elements like

    s, but IANA web developer.

  • Naomi (unregistered) in reply to Naomi


  • Peter (unregistered)

    I've seen this (or something like it) from dreamweaver way back when. when you are positioning something in the WYSIWYG editor, if you nudge things with the arrow keys, every tap of the arrow key adds a positioning element rather than altering the extant. I edited a boss's html one day because he was having trouble with the positioning and found that the relevant content was housed within 452 sets of tags. he only noticed the problem because of the rendering bug that would still offset things by a measurable sub-pixel amount for every formatting tag.

  • (author) in reply to Naomi

    What'd I do? I claim no responsibility for the comments' section markdown formatter, beyond once saying, "hey, our comments should probably support markdown".

  • (nodebb)

    I'm going to guess this was generated code despite being checked in.

    Someone made this in some editor and then pasted it into the system.

  • Robin (unregistered) in reply to Naomi

    Apologies, that was lazy googling, and me foolishly choosing to take some Stack Overflow answers too literally. Entering the offending HTML directly in https://validator.w3.org/nu/#text area does show an error - which makes me feel better, as I definitely thought it was invalid.

    (I thought in theory it might be fine because you could hypothetically style the span to have display block - but seriously, why would you ever do that rather than just use a div? Dangerous question to ask on this site, of course 😏)

  • (nodebb) in reply to Naomi

    As I understand it, a is an inline element and so may not contain block elements

    You can override that with the CSS [display](https://developer.mozilla.org/en-US/docs/Web/CSS/display) property.

  • Naomi (unregistered) in reply to Remy Porter

    Remy, I'm sorry - that was intended as light-hearted teasing, and I didn't mean for it to come off as a serious criticism.

  • conartist6 (unregistered)

    Maybe they were trying to create an inductive proof of centering?

    Seriously though, I like the dreamweaver theory.

  • Naomi (unregistered) in reply to Gurth

    Well, yes, but it's still a block element as far as the HTML spec is concerned, right? I can't imagine the validity of an HTML document depending on code in another language that may or may not even be available (I'm referring to <link> tags), and playing around with the W3 validator seems to bear that out. I'm still not a Web developer, so if I'm missing something, please let me know - I always love learning new things!

  • Somebody Somewhere (unregistered)

    Remember back in the old days, when browsers would display some sort of warning indication if the page had errors?

  • MiserableOldGit (unregistered) in reply to Peter
    I've seen this (or something like it) from dreamweaver way back when. when you are positioning something in the WYSIWYG

    Ah yes, that sounds very familiar. I remember Nightmareweaver doing all sorts of hoopy stuff like that when I was forced to use it. I switched to Notepad ++ whenever no-one was looking, I don't need no stinkin' WYSIWYG anyway!

    The only good thing about Dreamweaver was that it wasn't Frontpage.

  • (nodebb) in reply to Somebody Somewhere

    Ah yes, back in the days when it was possible to encounter (or, indeed construct) a page that didn't have errors somewhere.

    Quite rightly the developers concluded that it was pointless to have an error warning that (a) displayed on, to within rounding error, 100.0% of web pages, and (b) showed a bunch of errors that the average user could not understand, was not responsible for, and had no way to correct.

  • SG (unregistered) in reply to Remy Porter

    You work in IT... you should be more than familiar with being blamed for stuff that's not your fault.

  • 516052 (unregistered) in reply to Scarlet_Manuka

    Excatly. Back in the good old days all our exceptions were unchecked, our stacks overflew regularly and our browsers showed errors for the world to see. When your program crashed or your webpage bugged that was a message to all who would look that the developer is a fool. And that he deserves to be shouted at, pointed and laughed at and shamed.

    Now a days with checked exceptions and friendly messages, crash reporters and browsers and all that other crap people are free to write crap code and the system will either hide them or make them look like something that was predicted and designed beforehand. And thus did developers become lazy and lame. And woe was to the world.

  • RLB (unregistered) in reply to The Incredible Holk

    Most oft these 6 sites would use an incorrect Character encoding.

    I'm particularly disappointed (though I should've known, really) by ESR.

Leave a comment on “Pixel Perfect Design”

Log In or post as a guest

Replying to comment #:

« Return to Article