English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

4 answers

No CSS is not programming, it will not do anything in terms of actions. It is there to set the style of a web-page without having to put the formatting code into each page of the site. You can create one css style file and call that file in each page. This will keep your pages all looking the same.
To learn more about css and how to code css I would suggest this site:
http://www.w3schools.com/default.asp

2006-08-10 01:21:20 · answer #1 · answered by rachelle105210 5 · 3 0

As a webdeveloper myself, I want to emphasize about the "inheritance" in css. Yes, there is inheritance in css. Inheritance in a way of "including" another css file (stylesheet). But you cant relate it to object oriented since there are no objects. You can say that action is including.

For example, we use inheritance in CSS to include various stylesheets. A good typical scenario would be to include a ie5.css, ie6.css, netscape.css.
@import url(ie5.css); /* IE5 Tweaks */
@import url(ie6.css); /* IE6 Tweaks */
@import url(netscape.css); /* NETSCAPE Tweaks*/

As you see above, Thats how you import (inherite) other css files into the existing file. You know it and I know it that every browser implements CSS different. So you could add the tweaks in one file and then import that file to the main stylesheet as stated above.

But remember that isn't Object Oriented. We can implement a modular design using inheritance. We can separate the webpage into modules. For instance look at the following implementation.
@import url(nav.css); /* CSS for navigation menu. */
@import url(lay.css); /* CSS for layout */
@import url(form.css); /* CSS for layout */
@import url(lists.css); /* CSS for lists */

Like for the above, I separated every stylesheet with its own characteristics.

You could do other stuff like separating, text , layout, and colors. Many other modular approaches.

But the main thing you have to understand is that IT IS NOT Object oriented. We only have include like structure. Same thing with the cprogramming language which isn't OO. Remember CSS isn't a programming language it is a Style Script, that only adds style to xhtml.

I want to say that the @include function adds some negativity that it will add more process time, thus more loading time. It would be better to place everything in 1 file. (Faster)

I hope you understand now. Take care and Good Luck

2006-08-10 06:06:10 · answer #2 · answered by ? 6 · 2 0

Its more like an "included" file so that you dont show the style sheet in your source code. Its just a file included with your html page so that it inherits all the styles that your CSS contains in its file. Its not object oriented. You can do the same thing with just a normal html file and include it with your html page, but with CSS and JS files, it is hidden in the source code. Its used worldwide in most companies because it is structured and more organized and it makes the website more uniform if all the webpages includes the same CSS style sheet.

2006-08-10 01:13:38 · answer #3 · answered by Sean I.T ? 7 · 1 4

Nope, css is not programming, and that inheritance has nothing to do with the inheritance in OOP. Well...maybe a little. :P

But CSS is not programming nor is XHTML

2006-08-10 01:11:17 · answer #4 · answered by Dragosh 3 · 1 1

fedest.com, questions and answers