Hey guys, I've got a question on optimization here and I'm not too sure if the solution I've come up with is the best option. In a nutshell, I'm working on a website that's divided into five sections. Each of those sections has a color assigned to it. That color is applied to border and font colors.
What I'm looking for it the best way to define those. Here's how I currently have it setup:
- Page is wrapped in a container DIV (div#pageName)
- Elements that need to be colored are called via child selector: div#pageName h1 {color: blue}
That seems to be working fine for now, but I'm wondering if there's a better, cleaner way to do it without having to load separate stylesheets. Any ideas, or is this pretty much it?
If your div is only there to
If your div is only there to wrap the whole, you can remove it and use <body id="pageName"> and #pageName h1 ...
DanA wrote:If your div is
If your div is only there to wrap the whole, you can remove it and use <body id="pageName"> and #pageName h1 ...
That's a great idea. Thank you.