how many CSS sheets allowed for a site?

Whether you're a budding designer looking for some tips or a HTML guru looking to advise, the Website Design & Graphics forums are the perfect place for you. Want your site reviewed? Post it here for our members and moderators to critique.
Post Reply
User avatar
fulton
Newbie
Posts: 2
Joined: Mon Oct 30, 2017 6:08 pm

#1

Mon Oct 30, 2017 6:09 pm

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


User avatar
edwin
Junior Member
Posts: 20
Joined: Thu Sep 28, 2017 6:17 pm

#2

Mon Oct 30, 2017 6:13 pm

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.
User avatar
fulton
Newbie
Posts: 2
Joined: Mon Oct 30, 2017 6:08 pm

#3

Mon Oct 30, 2017 6:25 pm

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.
User avatar
HMASERV
Newbie
Posts: 6
Joined: Thu Jan 25, 2018 11:53 am

#4

Thu Feb 01, 2018 9:15 am

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.
User avatar
saifulmac
Newbie
Posts: 2
Joined: Sat Apr 28, 2018 12:21 am

#5

Wed May 09, 2018 4:13 am

Hey, I will go for the "do both". Common elements css in a style file and other pages css in separate css files.
User avatar
Lewis-H
Junior Member
Posts: 12
Joined: Thu Oct 31, 2019 8:08 pm

#6

Thu Nov 07, 2019 12:38 am

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
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest