CSS3 or Javascript?

Place for questions and answers for all newcomers and new coders. This is a free for all forum, no question is too stupid and to noob.
Post Reply
aduss
Posts: 12
Joined: Sat Mar 17, 2012 6:02 pm

CSS3 or Javascript?

Post by aduss »

Hello, I would like to ask about using CSS3.. Apparently the CSS3 offers a lot of functions which can replace some js functions, like creating dropdown menus and hover tabs and so on. On the other, not everybody has newest version of browser. I am afraid that there still might be people to whose some important things like menus won't be shown or something. So my question is: what should I use? Thanks in advance.
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: CSS3 or Javascript?

Post by Jackolantern »

You're right that there are still far too many browsers who aren't supporting CSS3 correctly to use it for critical UI elements. So my advice is to use new CSS3 features for non-critical page elements that will degrade gracefully when they aren't supported. Perhaps just for some eye-candy. But use JS for critical UI elements, such as navigation menus, and things the user can't operate the page without.
The indelible lord of tl;dr
User avatar
a_bertrand
Posts: 1537
Joined: Mon Feb 25, 2013 1:46 pm

Re: CSS3 or Javascript?

Post by a_bertrand »

Actually, ideally, your page should degrade to a non-javascript page too, as maybe some people will have it disabled. Same for images etc.
Do I do it? It depends, if it's for my own game, no, if you don't have canvas and js support you simply can forget about my game. For my professional development, yes, most of my interfaces works without any JS.
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: CSS3 or Javascript?

Post by Jackolantern »

True. But like you said, for my personal projects I don't worry about people who have JS disabled very much, since the site probably uses it at its core.
The indelible lord of tl;dr
User avatar
a_bertrand
Posts: 1537
Joined: Mon Feb 25, 2013 1:46 pm

Re: CSS3 or Javascript?

Post by a_bertrand »

Then it's like my game => no JS then go away ;)
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
hallsofvallhalla
Site Admin
Posts: 12031
Joined: Wed Apr 22, 2009 11:29 pm

Re: CSS3 or Javascript?

Post by hallsofvallhalla »

That is my life statement. No JS then go away :P
Xaleph
Posts: 897
Joined: Mon Feb 07, 2011 2:55 am

Re: CSS3 or Javascript?

Post by Xaleph »

Muhahaha I could live by that rule..
User avatar
Script47
Posts: 147
Joined: Thu Nov 21, 2013 6:11 pm

Re: CSS3 or Javascript?

Post by Script47 »

I don't see why people would disable it anyway?
User avatar
a_bertrand
Posts: 1537
Joined: Mon Feb 25, 2013 1:46 pm

Re: CSS3 or Javascript?

Post by a_bertrand »

Could be for security reasons or company policy. People even disabled cookies at some point.
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: CSS3 or Javascript?

Post by Jackolantern »

I think the days of home users knowingly disabling Javascript are nearing an end. Look around at the web today. Even Fortune 500 sites are building JS into their core experiences. It just doesn't seem like you could get a lot done without it.

Businesses, that is separate case. A lot of businesses know that their intranet sites will work without JS, and see disabling it company-wide as a way of crippling Facebook and other time sinks with an added security bonus.
The indelible lord of tl;dr
Post Reply

Return to “Beginner Help and Support”