Welcome to Web Hosting Forum - Net Hosting Talk

Register now and be part of our community! When you register with the Net Hosting Talk you can join in with topics, start new topics, and generally be a part of the first level of our community. It's also quick and totally free, so what are you waiting for?

how many CSS sheets allowed for a site?

fulton

Newbie
Messages
2
Reaction score
0
Hello,

I could see that some only used a CSS sheet for their entire site. I wonder if it's not "risky" to do that (for example, use the same id multiple times) ... And so what would be the best solution between:

- use a single CSS sheet for the entire site

- use a CSS sheet per HTML page

- or do both (use a CSS sheet common to the whole site that groups elements that always come back, such as the header, the nav, the title, the logo, footer, etc. AND use a CSS sheet specific to each page for everything else ?

While waiting for your opinions ...
 

edwin

Moderator
Messages
40
Reaction score
3
Using a style sheet per page would slow down the loading speed of your pages, instead use a single sheet and separate each part with comments

Use the id in case the element is unique and strictly no other situation, otherwise use classes.
 

fulton

Newbie
Messages
2
Reaction score
0
Ok, thanks for your opinion! it reassures me, it makes things much easier! And I must confess that I had great doubts, because on many sites there are dozens of style sheets.
 

HMASERV

Newbie
Messages
6
Reaction score
0
A web app with a global set of design patterns, and then lesser-used design patterns on different sections of the site.
Content heavy site with a global set of structure, grid and typography and then additional CSS loaded for specific sections of site that need more.
Sites where every page is very unique (global and page-specific CSS).
Most sites.
 

Lewis-H

Newbie
Messages
12
Reaction score
0
I would say I average 2-3 CSS files per page. Keep in mind with CSS, it's cascading style sheets, meaning that if I have 3 style sheets linked on a page, make sure you understand how the styles cascade down, or you may get some unexpected results. Each web page doesn't need its own stylesheet.

Regards,
Lewis
 

Advertisement

Top