1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Would using the CSS toggle technique be worth building into for ecommerce?

Discussion in 'CSS' started by everlive, Feb 10, 2016.

  1. #1
    Sample here:
    http://fervorvia.com/fervorvia/testyard/

    I want to try and make a responsive menu and gallery with no JavaScript, then sell it as a basic simple HTML and/or PHP website.

    Is it worth it or just go with normal JavaScript?
    SEMrush
     
    everlive, Feb 10, 2016 IP
    SEMrush
  2. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    6,138
    Likes Received:
    1,208
    Best Answers:
    22
    Trophy Points:
    400
    #2
    Make sure you test it on as many mobile devices as possible. Some of those pure CSS toggle menus look / function like crap on cell phones and tablets (namely, they won't switch well between portrait / landscape views).
     
    qwikad.com, Feb 11, 2016 IP
  3. everlive

    everlive Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    Yeah, I read that is you can't use the input-label method for mobile but you would still have options with attribute targeting.
     
    everlive, Feb 11, 2016 IP
  4. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,630
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #4
    There is NEVER, EVER _ANY_ reason for using javascript for basic menu-functionality. Not ever. Why? Because when users doesn't use javascript, the menu is useless. ALWAYS make the menu work without javascript, then, if you need some fancy bells and whistles (which you normally won't) you can add some javascript to modify things that won't affect the basic functionality if javascript is turned off.

    As for your original question, properly coded HTML/CSS-templates / sites are VERY rare, so some decent ones would be welcome - however, I doubt you have the knowledge to pull it off (based on your idea about going back to javascript for functionality that shouldn't be based on javascript to begin with).
     
    PoPSiCLe, Feb 13, 2016 IP
    kk5st and sarahk like this.
  5. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    6,138
    Likes Received:
    1,208
    Best Answers:
    22
    Trophy Points:
    400
    #5
    On the other hand there are not that many people out there that use javascript-disabled browsers. 99% of the time you can't view, buy, sell, make a post, etc. without javascript being enabled. Something as simple as making PayPal payments won't work without javascript. But you already know that. And the thing is some of that CSS stuff is fairly new. A few years back you couldn't open (and keep open) on click a drop down menu made in pure .css. So I don't get it when people vehemently say that we should stay away from javascript, when the truth is if a whole site depends on it would it only make sense that your menu depends on it too (again like in the PayPal example)? It's not a requirement of course, just makes more sense.
     
    qwikad.com, Feb 14, 2016 IP
  6. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,157
    Likes Received:
    1,708
    Best Answers:
    239
    Trophy Points:
    515
    #6
    The thing about using CSS for this is simple; PLAN FOR GRACEFUL DEGRADATION. This means if the fancy new CSS isn't available, you should show ALL the options. The SAME thing you are SUPPOSED to do with JavaScript where most of the ignorant turds out there sleazing together sites any old way are either too lazy, ignorant, stupid, or scummy to even know what that means.

    But really on menus, despite my own recently posting an article on doing so:
    http://www.cutcodedown.com/tutorial/mobileMenu

    It's NOT something I really endorse doing on websites in the first place. If you have enough "menu items" or selections to "need" this type of functionality, there is likely something disastrously wrong with the organization of your site.

    That or you're just plain thinking about the problem wrong. I've seen it for ages where people use a SELECT+Scripttardery to do a list of anchors and some CSS2's job... or a bunch of anchors or button tags + scripttardery to do type="radio"'s job, or just plain shit that doesn't need scripting on ANY damned platform.

    But, you make statements like that, and @qwikad.com points out the problem, some halfwits magically transform that into "Never use JavaScript"... just as they turn "don't use tables to layout" into "never use tables" and "use EM and STRONG when their semantic meaning is more appropriate" into "never use B and I" in an utter and complete lack of comprehension skills.

    Even one of my favorite statements, the "unwritten rule of JavaScript" gets blown all out of proportion; "If you can't make a fully working page without JavaScript first, you likely have no business adding JavaScript to it" does NOT mean "never use JavaScript"!!!

    It's much like the current political climate where everyone only seems to see everything in black and white, and even suggesting a shade of grey is likely to get you accused of being a leftist moonbat if you point out how racists and bigoted the "right" is, and accused of being a racist bigot if you dare point out that Hillary is a career criminal.

    I am grey, I stand between the candle and the dark...

    But any way you look at it, if you can do it without JavaScript first, do it that way. But just like when using JavaScript have a plan for when it doesn't work or isn't available. That's what HTML is FOR! It's the ENTIRE reason it was created.
     
    deathshadow, Feb 14, 2016 IP
  7. everlive

    everlive Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #7
    Wow guys, I feel like I just stepped into some underground war I was not previous privy too. But yeah, I get that you need to keep the JavaScript separate from the main structure but not outright remove it just because you want to be 100% safe with your design across all browsers. I'm just imagining where this would go if a menu has 20+ navigation buttons because the owner doesn't know what moderation is.
     
    everlive, Feb 17, 2016 IP
  8. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,157
    Likes Received:
    1,708
    Best Answers:
    239
    Trophy Points:
    515
    #8
    That is actually a VERY accurate description. There's actually multiple brushfires going on. Browser makers at war with each-other refusing to even try to interpret the same standards the same way, browser makers in control of the W3C not giving a damn about the people actually writing websites, developers and artists under the DELUSION that they are "designers" butting heads over accessibility and functionality vs. Artsy-fartsy BS that just makes sites harder to use... sleazeball scam artists who just want to crap out pages any old way vs. people who want to make sites easier to access, easier to create, and easier to maintain...

    Ends up being verbal pissing contest turf wars that if the folks involved were using firearms instead of words, it would make Oakland look like Mayberry RFD.

    Something made all the worse by many forums being run BY the sleazy scam artists and delusional art faygelahs so don't you DARE say ANYTHING that's been said in this thread or you're instantly banned there for being "confrontational".

    Because apparently even SUGGESTING something might be bad or casting anything in a negative light is now socially unacceptable. You'd almost think we were endangering the scam artists ability to prey on the ignorance of newcomers or something.
     
    deathshadow, Feb 18, 2016 IP