PDA

View Full Version : [CSS] Including 2 CSS files



NeoDreamer
January 19th, 2007, 08:27 PM
Would your page work if you linked to two CSS files? I have my own CSS file, and I downloaded another CSS file from Lightbox (http://www.huddletogether.com/projects/lightbox2/), which has some image animation effects. I remember I tried it once and it failed.

Tudor.b
January 20th, 2007, 04:23 AM
Yep, you can add multiple stylesheets to a page..

NeoDreamer
January 20th, 2007, 01:44 PM
Like this?

<link href="one.css" rel="stylesheet" type="text/css" media="screen" />
<link href="two.css" rel="stylesheet" type="text/css" media="screen" />

thebloodpoolkid
January 20th, 2007, 04:24 PM
You can have one style sheet and call it "main.css" and that style sheet would have the following



@import url(stylesheet1.css);
@import url(stylesheet2.css);


and then in your actual html page you would have

<link rel="stylesheet" type="text/css" href="main.css" />

or you can do it the way you posted.