PDA

View Full Version : Javascript vs. CSS


Sikawtic
01-13-2005, 7:11 PM
I am currently deciding where to take the future of sikawticom, and have come to a decision. Javascript? or CSS? I have big books on both, so thats not a problem. But which, is better? If one is not better than the other, what are the benefits and downfalls of each?

Intellectual responses are appreciated,
-SiKawtic

TimP
01-13-2005, 7:28 PM
You're comparing apples and oranges. Javascript deals with client side scripting and CSS controls visual styles. They're often used in tandem.

Sikawtic
01-13-2005, 7:51 PM
Which one do you suppose is more useful to learn (first)?

Markpyro
01-13-2005, 8:13 PM
CSS is easy and takes little time, at least it did for me. I suggest that first.

BSTRhino
01-13-2005, 8:19 PM
I suggest CSS too. Unless you're going to do some super-powered units.dat processor or something, the most you'll need to know about javascript is that you can copy scripts from hotscripts.com and other places.

TimP
01-13-2005, 9:10 PM
CSS is more like HTML, Javascript is more like conventional programming languages. It is loosely typed (the var datatype is the only one) like BASIC, but uses C style syntax (brackets, parenthesis, looping).

Sikawtic
01-13-2005, 9:58 PM
<html>
<head>
<title>More Styles</title>

<style type = "text/css">

a.nodec {text-decoration: none }

a:hover {text-decoration:underline; color: red; background-color: #ccffcc }

li em {color: red; font-weight: bold }

ul {margin-left: 75px }

ul ul {text-decoration: underline; margin-left 15px }

</style>
</head>

<body>

<h1>Shopping list for <em>Monday</em>:</h1>

<ul>
<li>Milk</li>
<li>Bread
<ul>
<li>White bread</li>
<li>Rye bread</li>
<li>Whole wheat bread</li>
</ul>
</li>
<li>Rice</li>
<li>Potatoes</li>
<li>Pizza <em>with mushrooms</em></li>
</ul>

<p><a class = "nodec" href = "http://www.food.com">
Go to the Grocery store</a></p>

</body>
</html>

that was the third tutorial in my book... i started learning CSS... woot!

BSTRhino
01-13-2005, 11:20 PM
Wow, that's the tidiest CSS I've seen in ages lol

Would you agree AJ? (who happens to be reading this thread)

Sikawtic
01-13-2005, 11:38 PM
The book has various hints throughout its cover, one of which is plenty of tidiness ^_^

GrassDragon
01-14-2005, 12:05 PM
What book are you using? I found some online stuff, but it's not quite what I want. A good book would be nice.

Sikawtic
01-14-2005, 12:36 PM
I'm using "2nd edition: Internet & World Wide Web How to Program" by Deitel(tm)

Its got html, javascript, css, python/php, and some other stuff.

GrassDragon
01-14-2005, 12:49 PM
Wow, 1500 pages! Thanks, I'll look into it.