Forum Moderators: not2easy
#header1{...}
#header2{...}
and originally i had only one header menu:
#header1 ul.leftmenu {...}
i want #header2 to also use this menu. do i have to write the line as this:
#header1 ul.leftmenu, #header2 ul.leftmenu {...}
is that the proper way to write that?
and what if i end up with like 8 headers?
i think im making too much code for myself, there has to be an easier way.
#header1 ul.leftmenu, #header2 ul.leftmenu {...}
2) It sounds as though what was once intended to be a one time per page id is now best served by a class.
.....................
and what if i end up with like 8 headers?
To avoid this situation:
A) Leave #header1 ul.leftmenu as it is and there will be no problems with existing markup.
B)Make the second piece of the declaration a class that you use again and again on the page. This eliminates the "like 8 headers". Class is the appropriate choice for declaration blocks that will see multiple uses on a page. For example, change the declaration above to:
#header1 ul.leftmenu, .header2 ul.leftmenu {...}
Now - the 'legacy' id #header1 is safe, but you can use .header2 as much as you want and not worry about needing to add more identifiers in front of the declaration.
.....................
3) You could, if desired, do a search and replace of all #header1 - change to .header2, and then trim the CSS to the new usage needs.
.header2 ul.leftmenu {...}