tags:

views:

57

answers:

1

Hi,

My designer created a stylesheet that makes heavy uses of id's. Example:

<div id="globalheader">
<ul id="globalnav">....

css:

#globalheader { width: 715px; height: 100px; margin: 18px auto; position: absolute; top: 0; left: 20; z-index: 9998; }
#globalheader #globalnav { margin: 0; padding: 0; }
#globalheader #globalnav li { display: inline; }

This doesn't display correctly anymore as soon I change one of the div elements to 'runat=server' because this will cause the ClientID to change. How can I solve this?

-Edoode

+3  A: 

This is a problem that I don't think is solvable without post generation workarounds, some of them being...

  • Add class attributes to the html elements and change the style declarations to .globalheader
  • Leave the html elements as they are and do a find and replace in the stylesheet (the new id names should have a consistent prefix e.g. #ctl00_globalheader)
Nick Allen - Tungle139
Thank you. Nested classes were indeed the way to go.
edosoft