SitePoint Sponsor

User Tag List

Page 5 of 6 FirstFirst 123456 LastLast
Results 101 to 125 of 136
  1. #101
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Oddz - nicely executed

  2. #102
    SitePoint Addict rochow's Avatar
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Agreed, if the naming-convention is not portraying the relationship.
    In this case (going back to the original box thing) the class is added only for styling purposes not for any other reason, so even if the heading is called .headline and the parapgraph is called .text or whatever, its still not any more semantic than using empty divs to do the cornering.

  3. #103
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rochow View Post
    In this case (going back to the original box thing) the class is added only for styling purposes not for any other reason, so even if the heading is called .headline and the parapgraph is called .text or whatever, its still not any more semantic than using empty divs to do the cornering.
    I disagree

    Not all 'developers' use classes for 'styling' purposes only. The benefit via 'using' extra classes to describe relationships is beneficial because:

    1. Describes content
    2. Can be used 'for extra' styling hooks. *This is a 'benefit'*
    3. Shares relationships

  4. #104
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could be 'class' heavy but, there is a shared relationship.

    Code:
    <ul class="menu site primary">
    	<li class="menu item">...</li>
    	<li class="menu item">...</li>
    	<li class="menu item">...</li>
    </ul>

  5. #105
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    If you were doing this in XML you would instead use:

    Code xml:
    <menu><site><primary>
    	<menu><item>...</item></menu>
    	<menu><item>...</item></menu>
    	<menu><item>...</item></menu>
    </primary></site></menu>

    which does look very heavy and redundant.

    You can remove all of the lower level classes

    Code html4strict:
    <ul class="menu site primary">
    	<li>...</li>
    	<li>...</li>
    	<li>...</li>
    </ul>

    and refer to them by element name instead as .menu li, .site li, .primary li
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  6. #106
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, I am 'approaching' this in a 'microformatic' way, if that is even a word

    In an example such as mine, these tend to be 'redundant' but, I think you get the picture.

  7. #107
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Classes 'should' not just be looked as 'styling hooks'. Classes in the new 'era' convey a relationship within the document. An example such as mine posted, is telling you that each menu item has a relationship with the menu.

    What if you were to 'read' your naming-conventions/content to a blind person?

    All he/she would hear is:
    Home
    About
    Contact

    Instead of:
    menu item: Home
    menu item: About
    menu item: contact

    You might say, this would not matter since the parent list has 'menu'.
    They could 'miss' hearing the parent 'menu' and then would not know what home, about and contact are.

  8. #108
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also, if there were 200 menu items, the person would probably want to hang themselves after hearing 'menu item' HA!

    This is a 'great' thing to toggle your brain around

  9. #109
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by cooper.semantics View Post
    What if you were to 'read' your naming-conventions/content to a blind person?

    All he/she would hear is:
    Home
    About
    Contact

    Instead of:
    menu item: Home
    menu item: About
    menu item: contact
    I suspect that a less appropriate mechanism is being used here than already exists.

    The title attribute seems to be a more appropriate choice.

    Code html4strict:
    <li><a title="Menu item linking to the home page"
        href="home.html">Home</a></li>
    <li><a title="Menu item linking to the about page"
        href="about.html">About</a></li>
    <li><a title="Menu item linking to the contact page"
        href="contact.html">Contact</a></li>
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  10. #110
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You are missing my point

    I am using naming conventions to do so, not titles.
    I guareentee 10 years from now 'class' names will be used for 'adding' relationships throughout document.

    Code:
    <ul class="menu site primary">
    	<li class="menu item home">...</li>
    	<li class="menu item contact">...</li>
    	<li class="menu item about">...</li>
    </ul>
    Here is what I am doing:


    So basically, since this is not a newspaper 'menu' nor a magazine 'menu', I do not select those. In this case it is describing the 'web-site' menu. I know, I know... Needs a lot of work. hehe
    Code:
    menu
    	newspaper site restaurant
    		primary secondary .....
    			item

    In this day and age, most including myself do this:
    Code:
    <ul id="menu-primary">
    	<li>...</li>
    	<li>...</li>
    	<li>...</li>	
    </ul>
    I am not looking in the 'same' walled solution. I am using classes to portray a whole new 'relationship'.

  11. #111
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    I think I see what's going on here. I mis-interpreted your comment about a blind person as being about how screen readers would handle the code.

    What you're getting at though is a way to provide more detail to automated systems about your design.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  12. #112
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are 'helping' someone on the forum, 99% of the time they are not doing what I am doing. So please correct them! hehe

  13. #113
    SitePoint Guru Chroniclemaster1's Avatar
    Join Date
    Jun 2007
    Location
    San Diego, CA
    Posts
    784
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure if the class attribute will become a data dump for XML style processing. However, I completely agree that class names are critical ways to define relationships. I use a bit lighter code than you, cooper, just because it makes maintaining the site easier down the road, but not much. If those structural relationships are not explicitly defined in the HTML as you're doing, there is no other place for it and the page is "too light". Basically its not really semantic.
    Whatever you can do or dream you can, begin it.
    Boldness has genius, power and magic in it. Begin it now.

    Chroniclemaster1, Founder of Earth Chronicle
    A Growing History of our Planet, by our Planet, for our Planet.

  14. #114
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Chroniclemaster1 - Sorry, have to disagree with you.

    Are microformats not semantic?

  15. #115
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Having been involved with Microformats for several years, I would agree that they are very semantic, except for a couple of side issues such as includes, and times and dates.

    RDF is another possibility that does a better job of expressly defining relationships, but at the expense of being quite verbose.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  16. #116
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by pmw57 View Post
    Having been involved with Microformats for several years, I would agree that they are very semantic, except for a couple of side issues such as includes, and times and dates.

    RDF is another possibility that does a better job of expressly defining relationships, but at the expense of being quite verbose.
    I as well like the 'direction' microformats are 'digging' towards. Have you checked out John Allsopp's 'Microformats: Empowering Your Markup for Web 2.0'?

  17. #117
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by cooper.semantics View Post
    Have you checked out John Allsopp's 'Microformats: Empowering Your Markup for Web 2.0'?
    Yes, I was there on the microformats mailing list when he announced it was ready.

    For others, a good summary of Empowering your markup for Web 2.0 is available too.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  18. #118
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,278
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    I've been recently conducting some digging in terms of newspaper jargon and I think there is a lot of opportunity to potentially take common news paper jargon such those outlined below to create more semantic, but flexible and generic conventions.

    slug
    skybox
    mainbar
    jump
    ear
    copy
    oped
    morgue
    byline
    column
    clip
    cut

    Maybe a bit radical, but who knows.
    Hmmm, that's a pretty good idea.

    Though some sites are like newspapers, and a lot are not. No way I could wrangle those sensible terms on some black-turtleneck-wearing iMac-toting graphic designer's site, with all sorts of weird boxes all over the place.

    After crawling through this thread, I think I'm going to name my classes whatever comes into my head at the time. I will still avoid placement-on-the-page names as those obviously cause problems if something changes position due to redesign, but seriously, if I need to add a class in order to add some goofy background image, I'm going to call it something like, the class whose sole purpose in existing is to hold a bg image, and then I and everyone working on the page knows why there's a class there and what it's doing. If it changes what it's doing in the future... I suspect this happens a lot less frequently than changing position or colour on a page.

    It seems a group of people have decided that <header> and <nav> are soooo necessary that they have named new HTML elements called them. Now we're really screwed. Though HTML5 may never come to pass. Some of the ideas are pretty silly, looking at them, but I wonder if they come out of threads like this one where people start looking waaay too deeply into things.

    offtopic I would love to use microformats, but currently they do nothing for real estate or insurance sites, so, currently worthless. Maybe we'll need some insurance or real estate blogs? It seems microformats are being written by bloggers and MySpacers/Facebookers/Flickr/Twitter-ers who have completely different content than the rest of the web.

  19. #119
    SitePoint Addict rochow's Avatar
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So what exactly are the point of Microformats? Perhaps they've done something since I last looked, they were rather pointless. Such as "oh you have a list, add a class of xoxo on it also"...

    Imagine being able to integrate all of your web-based contact details, tagged articles, and geographical information seamlessly in web and desktop applications
    LOL, keep imagining. Developers can't even follow W3C standards that have been around for YEARS, anybody who honestly believes everyone will "come around" and use microformats is in fairyland.

  20. #120
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,278
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Eh, for teh bloggitty blogger types, they want to have their PDA stick Jane's barbeque automatically into their calendar.

    I just don't use that garbage (PDA's and iPhones... hell I don't even use a mobile phone), and I don't write social sites, so right now, they're pretty useless for me. I think eventually as technologies evolve, being able to move authored content from one filetype to another or from one app to another more easily isn't a bad idea.

    Though you may have read the "Metacrap" article : ) google it, it's funny (and there's an update interview floating around out there as well).

  21. #121
    SitePoint Addict rochow's Avatar
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I trawled through the Microformats site itself and it's wiki. It seems very foolish to actually believe that everybody will use it, which judging by the way some people talk actually think that will happen soon.

    Thinks like adding to calender are usability enhancing things, which is of value. The rubbish that doesn't do anything much (which from memory there was quite a bit of) is a waste.

    Not that I'd even be in a position to use it much, don't work on many sites that they could even come into play.

  22. #122
    SitePoint Wizard silver trophybronze trophy
    Join Date
    Jul 2008
    Location
    New York, NY
    Posts
    1,432
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    John Allsopp:
    Google uses the “rel=’nofollow’” microformat to not give any ranking to links which include the use of that microformat.
    @Rochow: Companies are starting to use 'microformats' this day and age. I can see that you 'obviously' do not know enough about 'microformats' to really care at this point.

    When 'css' came around on the scene, who thought we would be 'styling' are entire layouts with it one day?

    -Nobody-

  23. #123
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,705
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Portability is the strong idea behind microformats, whether that be of data portability or social-networks portability.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  24. #124
    SitePoint Addict rochow's Avatar
    Join Date
    Oct 2006
    Location
    Queensland, Australia
    Posts
    300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Taken straight from a Sitepoint article:

    <p>
    Hey everyone,
    next week is my birthday party,
    we should all meet up at my house for pizza.
    </p>
    versus

    <p class="vevent">
    Hey everyone,
    <abbr title="2008-05-29" class="dtstart">
    next week</abbr> is my
    <span class="summary">birthday party</span>,
    we should all meet-up at
    <span class="location">my house</span>
    for pizza.
    </p>
    If they care that much about coming, they'll take 10 seconds to manually add it.

    If they ever "come about" then they can be added in with no more effort than it would have taken to add in the first place. For the time being though, I'm happy to keep striving towards clean HTML.

  25. #125
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,151
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    Before somebody new comes along and decides to use this method there is one stipulation. That stipulation is that IE5 and IE6 do not support multiple class selectors. If you place multiple classes on a element and try to select it in those browsers the elements class will be equal to the last class. Therefore, you can't use combined classes in those browsers. So if you care about IE6 chances are you wouldn't want to use the method being discussed.


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
  •