Log in

View Full Version : Advantage of CSS over Javascript



vanbao
02-28-2007, 07:31 PM
I am new to CSS and I just realized that there is a lot that can be done using CSS instead of Java Scripts. Does any one know which is bette to use. I know that the use of Java script is not good when it comes to search engines. Do we have this same problem with css?

Thanks.

mburt
02-28-2007, 07:38 PM
JavaScript also doesn't work in IE 5 and down without an annoying ActiveX popping up to welcome you :). And yes, in most cases using pure css is much better, seeings all browsers support it (even some handheld browsers)

Twey
02-28-2007, 10:07 PM
Not just that, but the elegance of the code: CSS is less powerful than Javascript, but compensates by being both more readable and terse with the effects it can achieve.

pcbrainbuster
02-28-2007, 10:15 PM
I think your all pretty much losing it :)
They both complement eachother by this i mean that in javascript css can be used to add what i call css animation for an example say you set the letter-spacing of a text with css to 10 well thats pretty much it right there but when javascript is added it could first make the letter-spacing 1 then 2 then 3....

And that creates a small animation withh css that looks pretty excellent !!!

So basically what i am saying that without both of them animation is a little bad :)

Twey
02-28-2007, 10:16 PM
We were talking about effects that could be accomplished using CSS alone.

pcbrainbuster
02-28-2007, 10:21 PM
Oh sorry :)

hazardis
03-01-2007, 03:44 AM
css is easier. css cant achieve as much as javascript though. really depends if you are into code or design i guess. if you can do something with css that elimenates the use of javascript in a site, such as roll overs i would consider that a better way to build a site. thats my 2 bits anyway.