Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help3403


This forum is provided to promote discussion amongst students enrolled in Agile Web Development (CITS3403).
 
Options:
RSS cloud
Jump to:

Multiple style sheets?

1 of 419 articles shown, currently no other people reading this forum.
photo
From: Takoyaki N.
Date: Sat 23rd May, 10:39am
Actions: 
        Login-to-reply
ANONYMOUS wrote:

> I read somewhere on this forum that having only one stylesheet for all webpages is 
> ideal. Would it be bad practice for each webpage to have two stylesheets: a shared 
> one that includes generic styling such as navbars, fonts, h1 etc.. and a stylesheet 
> that styles components only belonging to that webpage and nowhere else.

Pretty sure Tim covered this in the CSS lecture.  Having a single style sheet for the 
entire website is good because a copy will be cached on the users machine and provides a 
central place to change styling.  Due the cascading nature of CSS if you want additional 
styling that overrides the stylesheet or that is unique to that page you can use a second 
sheet or place it in the head of the HTML document.  Just remember to place the second 
sheet/other style after you have called the global sheet.

Related articles

Multiple style sheets? (both) RSS
├─ original ambivalent Fri 22nd May, 10:24pm, ANONYMOUS
└─ THIS   Sat 23rd May, 10:39am, Takoyaki N.
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  8:27am May 24 2020