Jump to content

Most Efficient Use Of Css


owosso
 Share

Recommended Posts

I want to have a general css file. Then I also want horizontal menu specifications and vertical menu specifications.What is more efficient and faster loading: to have one CSS file that is long and contains all of the above code? Or three smaller files and link to all of them?

Link to comment
Share on other sites

For most cases, defining them in one file would be more efficient, as the browser only has to make one HTTP request.If a certain piece is used sparingly (say, only in one section from a total of much more sections), it's better to separate that piece in its own file to improve downloading speed at the rest of the site. If it's used almost everywhere (say, in all but one section), it's better to load it all at once.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...