cascading style sheet

Status
Not open for further replies.

rookie1010

Fully Optimized
Messages
2,069
cascading style sheet in c project

Hi
can you guys /gals tell me what the function of a cascading style sheet is?

basically i am looking at a c++ project
and i have come across 2 cascading style sheets in it.
i have got an xml file which acts as some sort of configuration file and a bunch of html files

i think the cascading style sheets has got something to do with the html files or can it have something to do with the xml files
 
.css sheet is normally for html files. It provides a static style sheet...hence the name cascading style sheets. It lets you define different parts of an html file, only have more control over it. It allows you to control everything from color, to tables...without actually using tables :p
 
i guess that the html knows that it needs to get the properties from the style sheet.

you mentioned static style sheets, are there dynamic style sheets too?

are there any tag values which indicate linkage to style sheets?
 
<link href="styleSheetName.css" rel="stylesheet" type="text/css">

will link to a style sheet.

if you scan the source code on websites and find this tag you can locate the stylesheet and have a look - this you'll get an idea of what stylesheets are used for.
As long as you can code html it shouldn't take you too long to pick up.
 
i have done a bit of html, but not anything involving stylesheets

what is the rel and type "fields"

i checked out the webpages which lies in this folder, and removed the stylesheets and observed the effect

what is the difference between static and dynamic stylesheets?

if the stylesheet resides in a locaton other than the folder where i guess the normal rules of convention follows, if the html files reside
 
Dynamic stylesheets allow the styles to change dynamically (not surprisingly), like
<H1 onmouseover="this.style.color = 'red';">stuff</H1>

Pretty cool merging of CSS and dynamic scripting, I think. You didn't finish your questions, if this might help answer it. You can keep the styles in a separate document, or you can include the styles within your document. If they are in a separate document, you just need to link to that document as shown by linkjj above.
 
something went wrong with my question?

thanks for the answer regarding the dynamic style sheets

what my second question was, how does the document knwo where the style sheet is located

i mean say there are two style sheets in two different folders, can i put some kind of link in my html files to say look at the following style sheet.

i guess if the style sheet is in the folder containing the html files, than it will pick it up automatically
 
If you place the following code between the <head></head> tags :

<link rel="stylesheet" type="text/CSS" href="../folder1/style1.css">
<link rel="stylesheet" type="text/CSS" href="../folder2/style2.css">

That should work.
 
you don't need two links.. merge everything into one file.. the browser will only pick up one stylesheet to use.. there are different levels of overriding style sheet.. external linked style sheet is the least important.. then embeded stylesheet is second most important, and inline stylesheet takes the most important seat..

i recommend google, here is a good resource taken from google: http://www.htmlhelp.com/reference/css/
 
Status
Not open for further replies.
Back
Top Bottom