CSS or Javascript?

kkenny

Active Member
Messages
1,950
Reaction score
0
Points
36
I'm planning on improving my friend's base layout, which has some Dynamic HTML and XHTML already, but I want to improve it by either using CSS or Javascript. I'm not sure which one to use, but here are a few questions I have for each language.

I know each language pretty decent, so learning more of it wouldn't be much of a problem.

What is supported in more browsers CSS/JS?
What has a tendency to be easier to code (Advanced CSS versus Advanced JS)?
Which is loaded faster (for example, friendly to the dial up users)?
and any other comments.

I really need to know which one I should use. They both seem like excellent languages. But having both could become a hassle so I'll have to choose one.
 

konekt

New Member
Messages
100
Reaction score
0
Points
0
CSS and Javascript are highly dissimilar languages. One is, as the name suggests, a scripting language. You can automate interactions and functions, however, the front end depends on implementation of the DOM and elements of HTML/CSS.

Any styling you would do would, ultimately, go through either HTML or CSS properties (you can also call in Mozilla elements, but it is not common practice). Thus, for function you would use javascript and link it with CSS for display.

For your questions:
What is supported in more browsers CSS/JS?

Due to their dissimilar nature (as aforesaid) you can not compare them. It can be said, however, that both have a high capability with most browsers and SHOULD be supported by all.

What has a tendency to be easier to code (Advanced CSS versus Advanced JS)?


In my opinion, CSS is very easy because it is not really a coding language. It is, once again as the name suggests, a simple markup style that does not depend on logic or variable maintenance to a high degree.

Javascript is based on prototypical object-oriented inheritance so it shares similarities with the high-end languages such as C++.

Which is loaded faster (for example, friendly to the dial up users)?

Again, unnoticeable and incomparable.


From your questions I gather you have very little knowledge of either. In my opinion the difference is much the same as the difference between the layout of a mathematics textbook and the material in it. The type-face and formating- the CSS- all mandate the look of the textbook but do not reflect the technical nature of the subject- the javascript. They serve different purposes.

As an afterthought: for simple websites that only present information, CSS is the way to go. If you want user-interaction, Javascript will most likely rear its head. Ultimately, CSS is much easier to implement and can not, through conventional means, be disabled on the user-side like javascript can.
 
Last edited:

marshian

New Member
Messages
526
Reaction score
9
Points
0
What is supported in more browsers CSS/JS?
They're both supported by the most browsers, a lot of them not keeping to the standards, but they still got something... But an advantage of CSS over JS is that it's possible to turn JS off, which a lot of people do to protect their pc. This would cause your layout to break.
Of course, you could also turn off css, but as you'll need css even if you're using JS, practicly every site's layout would break. Nobody can blame you for that, and the user will probally quickly turn css back on. (Compared with JS: most sites remain intact, the user won't turn it back on if he previously turned it off for security reasons.)
 

VPmase

New Member
Messages
914
Reaction score
1
Points
0
I would recommend using CSS since you cannot disable it in most, if not all, browsers. :)
 

kkenny

Active Member
Messages
1,950
Reaction score
0
Points
36
Okay, I guess CSS it is then. Time to replace the Intermediate JS in my head and replace it with Advanced CSS. Thanks guys.
 
Top