Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 06-10-2005, 11:02 AM   #1 (permalink)
 
Master Techie

Join Date: Mar 2004

Posts: 2,069

rookie1010

Default 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
rookie1010 is offline  
Old 06-10-2005, 02:08 PM   #2 (permalink)
 
Ultra Techie

Join Date: Sep 2003

Location: Bamberg, Germany

Posts: 549

Iron_Cross

Send a message via ICQ to Iron_Cross Send a message via MSN to Iron_Cross Send a message via Yahoo to Iron_Cross
Default

.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
__________________

See today\'s Penny-Arcade!(May contain foul lanuage)
Pain is weakness leaving the body.

PM Me for my MSN
Iron_Cross is offline  
Old 06-11-2005, 01:02 PM   #3 (permalink)
 
Master Techie

Join Date: Mar 2004

Posts: 2,069

rookie1010

Default

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?
rookie1010 is offline  
Old 06-12-2005, 07:18 AM   #4 (permalink)
 
Ultra Techie

Join Date: Oct 2003

Posts: 544

fitzjj

Default

<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.
fitzjj is offline  
Old 06-12-2005, 08:04 AM   #5 (permalink)
 
Master Techie

Join Date: Mar 2004

Posts: 2,069

rookie1010

Default

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
rookie1010 is offline  
Old 06-14-2005, 01:01 PM   #6 (permalink)
 
Junior Techie

Join Date: Jul 2004

Posts: 57

kerriganm

Default

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.
kerriganm is offline  
Old 06-15-2005, 01:21 PM   #7 (permalink)
 
Master Techie

Join Date: Mar 2004

Posts: 2,069

rookie1010

Default

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
rookie1010 is offline  
Old 06-15-2005, 05:07 PM   #8 (permalink)
 
Newb Techie

Join Date: Jun 2005

Posts: 10

Enigmatic

Default

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.
Enigmatic is offline  
Old 06-18-2005, 12:53 PM   #9 (permalink)
 
Master Techie

Join Date: Mar 2004

Posts: 2,069

rookie1010

Default

why two links to cascading style sheets?
rookie1010 is offline  
Old 06-19-2005, 03:30 PM   #10 (permalink)
 
Super Techie

Join Date: May 2005

Posts: 479

furtivefelon

Default

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/
__________________
lisp hacker
running: FreeBSD 5.4 - still learning
develop with: SBCL + emacs for lisp, Anjuta IDE +gcc for c, SPE for python..
browse with: opera
furtivefelon is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On