The Most Active and Friendliest
Affiliate Marketing Community Online!

“Propeller”/  Direct Affiliate

Multiple CSS Style Sheets?

susapra

New Member
affiliate
I'm currently in the process of designing my first full fledged site. The one thing I'm struggling with is while I want the overall look and feel of the site to be the same, some of the inter-page layout needs to be different to accomdate the variety of content between pages.

Is it acceptable to use two style sheets linked to one html page?

Also, would changes made in the second linked sheet over rule the 1st page?
 
It is common practice to use more than one external CSS File. For example one file for layout and positional control with the other one for text styling etc.

CSS stands for "Cascading Style Sheets"
The cascading bit is the equivalent of obeying the last order. With multiple external CSS files, if the same styling factor appears in more than one linked css file, the one from the linked file that appears last in the running order will be used.

Document level CSS can be inserted within the head of the document itself to override the external styles, but must be inserted into the head of the document after the appearance of the linking to all the external CSS Files.

The same cascading effect can be used to override a CSS File by placing a style specific to one HTML element usage in-line.
 
I think if the difference between the inner pages are only little, I would rather use inline style in order to avoid the loading increasement due to the plus http request.
 
If it is in minor proportion than it is better to define style on the page otherwise external css the the best option.
Using two css files is not problematic only you have to take care of the class names should be different.

Regards
John
 
Multiple Styles Will Cascade Into One

Style sheets allow style information to be specified in many ways. Styles can be specified inside a single HTML element, inside the <head> element of an HTML page, or in an external CSS file. Even multiple external style sheets can be referenced inside a single HTML document.
Cascading Order

What style will be used when there is more than one style specified for an HTML element?

Generally speaking we can say that all the styles will "cascade" into a new "virtual" style sheet by the following rules, where number four has the highest priority:

  1. Browser default
  2. External style sheet
  3. Internal style sheet (inside the <head> tag)
  4. Inline style (inside an HTML element)
So, an inline style (inside an HTML element) has the highest priority, which means that it will override a style declared inside the <head> tag, in an external style sheet, or in a browser (a default value).
 
It is common exercise to use more than one outside CSS File. For example one register for present and positional assure with the early one for text styling etc.
 
The external CSS file is the best option for me. And I don't think it will be a problem to use two or more CSS files for one page.
 
Last edited by a moderator:
Rattling simply, can we acquire quadruplex CSS stylesheets on the selfsame page. We requisite to use various stylesheets for a position we're processing and I counterfeit if we had them all in the stabilise directory, we can use them?
 
If separating css style will be you comfort zone,then so be it. besides,lot of developer uses multiple css styles to avoid confusion of codes.
 
banners
Back