2 replies [Last post]
Steel Frog
Steel Frog's picture
Offline
Regular
Last seen: 14 years 48 weeks ago
Timezone: GMT-5
Joined: 2007-02-22
Posts: 23
Points: 0

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?

=======================================
Steel Frog
http://www.steelfrog.com

DanA
DanA's picture
Offline
Elder
Last seen: 12 years 39 weeks ago
Timezone: GMT+2
Joined: 2004-08-14
Posts: 1087
Points: 2

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

Steel Frog
Steel Frog's picture
Offline
Regular
Last seen: 14 years 48 weeks ago
Timezone: GMT-5
Joined: 2007-02-22
Posts: 23
Points: 0

DanA wrote:If your div is

DanA wrote:
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. Smile

=======================================
Steel Frog
http://www.steelfrog.com