SitePoint Sponsor

User Tag List

Page 4 of 6 FirstFirst 123456 LastLast
Results 76 to 100 of 134
  1. #76
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,266
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    * needed chocolate!!! thanks *

  2. #77
    SitePoint Member
    Join Date
    Jun 2010
    Location
    USA
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The simple test is to take a 100 page website and see how long it takes to move all the text from the centre to the left. With CSS about two seconds, with <center> tags allow several weeks.
    Last edited by felgall; Jun 29, 2010 at 12:27. Reason: removed fake sig

  3. #78
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,629
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Unless you have a text editor that allows search-and-replace across multiple files.

    But yes - CSS is the way to go.
    Ian Anderson
    www.siteguru.co.uk

  4. #79
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,266
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Unless you have a text editor that allows search-and-replace across multiple files.
    Or... a small bash or ex script : )

  5. #80
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by siteguru View Post
    Unless you have a text editor that allows search-and-replace across multiple files.
    And (unless you have only one single <center>...</center> pair per page) really good regex skills ...
    Birnam wood is come to Dunsinane

  6. #81
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,266
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    <old chinese master>Ah, but one must not parse HTML with regular expressions, for HTML is not a regular language...</old chinese master>
    Oh boy, a chance for me to link to this again:

    utter brilliance

  7. #82
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How do you propose to use a bash or ex script without using regex? (Simple string search is a special case of regex, after all.)
    Birnam wood is come to Dunsinane

  8. #83
    Non-Member
    Join Date
    Mar 2005
    Location
    Bangkok
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    Wow! How did the guy do that?

    Never seen anything like it!

  9. #84
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    Perhaps the only one in English
    Perhaps! But either way, I feel proud to help fly the flag of content first
    Quote Originally Posted by Stomme poes View Post
    For some people, their life's work is also an art. When you are careful and proud of outputting excellence, no matter what that is (building things, creating things, dealing with people even such as in nursing), it should be understandable that someone who comes along and does things slash and dash creates emotions.
    That pretty much describes me, I've never thought of web design as a job, it's something I take a great deal of pride in (and I consider it a matter of art, science and philosophy all blended together). It really drives me nuts when I see people selling second rate junk, of course with personal self-built sites I don't have an issue with it, but when professionals start slapping dead weight like center tags into the code, it makes me sad that they don't have the pride in their work I do
    Quote Originally Posted by AutisticCuckoo View Post
    How do you think a construction worker would feel watching an alleged professional banging in screws with a hammer?
    Probably about the same as a computer expert being asked by a tech support team if they've tried rebooting

  10. #85
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,266
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    How do you propose to use a bash or ex script without using regex? (Simple string search is a special case of regex, after all.)
    That's true, although 99% of the time I'm going through a bunch of my static HTML files (that's how I develop) and making a single change across files, it wouldn't need much regex (not parsing-level anyways). Mostly stuff like
    look for "<sometag id="someid>" and after it, put (something) or delete (something) that is x-lines of content. vi has saved my butt changing hundred of urls on 2 pages, and it wasn't HTML-parsing-type of regex : )

    No, I dunno that I'd really honestly try a bash script to turn <center> tags into some other kind of tags; I'm sure someone has done it, but it was kind of a joke addon to siteguru's statement : )

    Quote Originally Posted by andrew
    Wow! How did the guy do that?

    Never seen anything like it!
    If you look up "Zalgo" in Encyclopedia Dramatica, somewhere among the gibberish is mention of a program you can use to make weird unicode madness. I forget the name, but he didn't manually type those out there : )

  11. #86
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    vi has saved my butt changing hundred of urls on 2 pages, and it wasn't HTML-parsing-type of regex : )
    Vi is still using a regular expression for that search-and-replace operation, even if you don't use any 'magic' characters in it.
    Birnam wood is come to Dunsinane

  12. #87
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,266
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Vi is still using a regular expression for that search-and-replace operation, even if you don't use any 'magic' characters in it.
    Yes that's WHY I was using vi (I'm still often using gEdit but I won't download any plugins for it), for the regex (gEdit is so dumbed down it doesn't have regex search and replace!). It's just not getting to the level of trying to parse HMTL. They were pretty simple regexes, lawlz.

  13. #88
    Non-Member
    Join Date
    Oct 2007
    Posts
    363
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    No, it doesn't. It usually doesn't require any extra markup. At worst, you'll need a wrapping <div>.

    To centre entire block-level elements:
    Code CSS:
    .quotes {
      width:40em; /* or whatever */
      margin-left:auto;
      margin-right:auto;
    }

    To centre text inside a block-level element:
    Code CSS:
    #nav li {
      text-align:center;
    }


    It's not depreciated (which would mean that it had lost in value), but deprecated (disapproved).

    And the reason is that the purpose of HTML (and the XML version, XHTML) is to mark up semantics (meaning) and structure only. All things to do with presentation belongs to CSS and everything behavioural belongs to JavaScript. The separation of these three tiers is an important principle, not only in web design, but in all sorts of development.

    By keeping the markup as clean as possible, it is easier to reuse it in other channels. You also increase the likelihood that you'll be able to redesign your site without having to edit individual pages. Such a thing is a chore for a static, page-based site, but an absolute nightmare if the content resides as data fragments in a CMS database.

    The separation of content, presentation and behaviour also helps users who need various types of assistive technology (like screen readers) to perceive web content. And it's beneficial for low-bandwidth devices and for expensive pay-per-byte wireless connections, since it reduces the amount of data that needs to be transferred for each page. Especially taking caching into consideration, as Alex mentioned.
    What he said.

  14. #89
    SitePoint Member
    Join Date
    Jun 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi there
    Older HTML tags and attributes that have been superseded by other more functional or flexible alternatives (whether as HTML or as CSS) are declared as deprecated in HTML4 by the W3C - the consortium that sets the HTML standards.
    Last edited by ScallioXTX; Jul 2, 2010 at 02:37. Reason: removed fake signature - wait a total of 90 days to expire to avail of a signature

  15. #90
    SitePoint Addict
    Join Date
    Jul 2006
    Location
    Fionnphort, Isle of Mull, Scotland
    Posts
    347
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I see you guys have finished sniping at each other at last. I'm on the side of the CSS users, but can anyone tell me why 'presentational' class names are so bad, please ?
    If I want to have a centered paragraph, it seems natural to have a class <p class="center">. I can reuse this many many times, and it's always clear what it does.
    Tim Dawson
    Isle of Mull, Scotland

  16. #91
    Non-Member bronze trophy
    Join Date
    Nov 2009
    Location
    Keene, NH
    Posts
    3,760
    Mentioned
    23 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ramasaig View Post
    I see you guys have finished sniping at each other at last. I'm on the side of the CSS users, but can anyone tell me why 'presentational' class names are so bad, please ?
    If I want to have a centered paragraph, it seems natural to have a class <p class="center">. I can reuse this many many times, and it's always clear what it does.
    For me it's the simple fact that how is that ANY different than using the ALIGN attribute? You still have to edit the markup to change that alignment when/if you reskin. I mean at that point, you might as well go back to writing HTML 3.2 -- One of the whole points to using CSS in the first place is the ability to reskin without changing the markup. It also doesn't help that it doesn't say WHY you are centering it. What's so special about that paragraph? Should other stylings be applied?

    Old school you'll often see people go nuts with crap like:

    <center><font size="+1"><b>Section Heading</b></font></center>

    They "embrace" (NOT) CSS, it ends up:
    <p class="center bigtext"><strong>Section Heading</strong></p>

    Defeats the point of using CSS and what I consider an essential part of it; Semantic markup.

    When what they probably should be using is:

    <h2>Section Heading</h2>

    If it's in the markup wrapping content, it should say what it is, NOT how it appears because in different user agents you might not even be styling it the same, and in the future you may want to reskin without touching the markup.

    Really, when I see half-assed markup like:

    <div class="left smalltext w760 level3">

    I have the overwhelming urge to smack somebody, as that doesn't actually say what the element ACTUALLY IS, and frankly at that point WHY are you bothering with CSS in the first place? If you're going to state all your presentation in the markup and just wrap classes with CSS -- Again you might as well go back to using HTML 3.2 since you've undone everything CSS is there to actually do.

    Used to be a joker around here that was even WORSE for it, stating their garbage CSS

    class="l s w7 l3 f t b i"

    *SMACK*

    Ranks right up there with the people who put lists around form elements, have fieldsets around JUST paragraphs (at which point that's not a fieldset), put the same class on the same tag some twenty times inside a perfectly good classed parent container, use STRONG on things that should not be upranked (and make wild claims about B and I being deprecated when they are not), and still use TARGET on non-frame pages or worse, use javascript to replicate TARGET's functionality and abuse definition lists and other tags on obviously tabular data because "tables are evil"...

    COMPLETELY MISSING THE POINT of HTML STRICT, CSS, and Semantic markup. It's also why I can go into most people's code and throw away a slew of markup as unnecessary/wasteful.

    This is made worse by many of these garbage "CSS frameworks" that are nothing BUT presentational CSS; Like YUI, Blueprint or Grid. COMPLETLY DEFEATS THE POINT OF USING CSS IN THE FIRST PLACE!

  17. #92
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,881
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by ramasaig View Post
    Can anyone tell me why 'presentational' class names are so bad, please ?
    If I want to have a centered paragraph, it seems natural to have a class <p class="center">. I can reuse this many many times, and it's always clear what it does.
    You might want it centred now, but how do you know what you will want when you next refresh the design?

    One of the principles of good CSS is that you can (in theory!) completely redesign the look of the site without touching the HTML. OK, so in practice, if you're going for something completely new, you'll probably want to update the code and the content, but for a minor refresh, you can often do it entirely in the CSS.

    What you've decided might be centred today could well be right-aligned with a blue border at the next refresh. And then you would either have to replace class="center" with some other name throughout the site, or live with the confusion of having class="center" giving you right-aligned text. And worse than that - you might have used class="center" for completely different things that, at the moment, happen to both be centred. But what if you wanted to change the style of some of those types things but not others?

    That's why IDs and class names should describe the purpose and content, rather than the presentation. Because <p class="strapline"> continues to give a sensible description even when you've changed the design, whereas <p class="center"> may not. Because you can define <p class="strapline"> and <p class="footer-links"> to use the same presentation now, and then you can make them different later, but if you've got both of them as <p class="center"> then you've tied them to always looking the same, and you've got a big job on your hands to untie them.

  18. #93
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,266
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Honestly, I come across enough times where there IS no reason... every place you see class="center" in my markup (not on any site that's actually MINE though), you can't ask what's special about that content. There is nothing special. It's Tuesday?

    Quote Originally Posted by ds
    What's so special about that paragraph?
    Uh, the boss thought that bit looked nicer centered on his screen. And blue. No other reason. So works the real world. We're not all freelancers who can fire our clients.

    This is WHY those frameworks have such terrible, presentational classnames. The classnames exist for styling, and one figures if a class exists for styling alone, you might as well name it after the style.

    Yes, this does mean you need to change them when the style changes. I do this at least once a week (we are rewriting a site and the boss only knows what he likes to see, doesn't know what he wants... make this blue!). It also is true that's it's not different from align="center", except there's more "freedom" in names in CSS.

    I agree with DS and StevieD in theory because ideally it would make our lives better. So would many other things.

  19. #94
    SitePoint Zealot
    Join Date
    Jul 2007
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My vote for post of thread (or as I've come to call it - the very dead horse) goes to omma goose!

    Quote Originally Posted by L'Oie(the goose in french for cosmopolitan legitimacy and flair)
    Uh, the boss thought that bit looked nicer centered on his screen. And blue. No other reason.
    Amen.

  20. #95
    SitePoint Evangelist Ed Seedhouse's Avatar
    Join Date
    Aug 2006
    Location
    Victoria, B.C. Canada
    Posts
    592
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    Honestly, I come across enough times where there IS no reason...

    Uh, the boss thought that bit looked nicer centered on his screen. And blue. No other reason. So works the real world. We're not all freelancers who can fire our clients.
    Nothing to stop you from giving that a class name like "WeirdBossBrainstorm" is there? After all the boss might have another brainstorm. Or, just possible, your boss has a reason why she wants it that way and you can reflect that reason in your class name, can't you? Maybe "BossThinksThisShouldStandout"?
    Ed Seedhouse

  21. #96
    SitePoint Zealot
    Join Date
    Jul 2007
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Ed Seedhouse View Post
    Nothing to stop you from giving that a class name like "WeirdBossBrainstorm" is there? After all the boss might have another brainstorm. Or, just possible, your boss has a reason why she wants it that way and you can reflect that reason in your class name, can't you? Maybe "BossThinksThisShouldStandout"?

  22. #97
    Non-Member
    Join Date
    Jun 2010
    Location
    4727′35″N 2618′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    Uh, the boss thought that bit looked nicer centered on his screen. And blue. No other reason. So works the real world. We're not all freelancers who can fire our clients.

    This is WHY those frameworks have such terrible, presentational classnames. The classnames exist for styling, and one figures if a class exists for styling alone, you might as well name it after the style.
    if your boss was to tell you how to do it for him, besides what to do for him, it might be believable.

    then again, he won't be needing you if he has total control over the what and over the how.

  23. #98
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,266
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    if your boss was to tell you how to do it for him, besides what to do for him, it might be believable.

    then again, he won't be needing you if he has total control over the what and over the how.
    He just says, this last line here? Can you put that more in the center?

    Seriously, I'm not going to lose the rest of my hair trying to invent some semantic reason why he wants the last line to be centered. There IS no semantic reason. He's talking about visual design, something I know very little about because I have zero talent in that area. He wants it centered, it gets a class of "center" and I have a list of classes in my Stylesheet like this

    .bold {
    font-weight: bold;
    }
    .ital {
    font-style: italic;
    }
    .center {
    text-align: center;
    }

    This is mostly because someone wants something today, I can throw a class on it. Tomorrow when he changes his mind, it's easy-enough to remove (which is absolutely necessary when your boss/graphic designer changes his mind like I change underwear).

    Nothing to stop you from giving that a class name like "WeirdBossBrainstorm" is there?
    But then I have to go look that up in my stylesheet to see what that does. "center" tells me... I must have put that class there to center the thing.

    Or, just possible, your boss has a reason why she wants it that way and you can reflect that reason in your class name, can't you? Maybe "BossThinksThisShouldStandout"?
    He seems to be a visual person. I notice he tends to look at "weight" and whitespace/negative space. He makes me change colours sometimes so that there aren't so many dark colours on one side or the other, that kind of thing. So centering some text is going to be because it looks nice on his monitor.

    Funnily enough, I don't tend to have things called "left" or "right". When the boss wants to shuffle stuff around, it's stuff that already has a name, a semantic name, so I can pretend I have code integrity in those times.

    That doesn't mean I don't try to think up semantic names and reasons for stuff where, content-wise, I can see where meaning and style come together. Those are also the things that tend to stay on the site and actually go online.

    BTW, last week he told me to make a popup ad.

    And I did it.

  24. #99
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,784
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    At least using

    .centre {
    text-align: center;
    }

    means that you can spell centre correctly
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  25. #100
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,266
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    I know 100% certain that if I spelled it centre I'd have text-align: centre.

    Do you know how often I catch myself stating colour: #fc0??? ARG French spelling ARG


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •