Hi,
I’m having trouble getting css-id’s, added to a page-elements, to work.
for instance:
css-id #topNav {background: #555555;}
added to a panel in a custom control:
<xp:panel id=“topNav”>hello world</xp:panel>
shows no background color at all.
The funny thing is that the preview in Designer looks just fine …
Where’s the catch?
Arthur
Subject: css ids
View the source and you’ll see the problem. Your element doesn’t have that id when it’s sent to the browser. It can’t, because if it did, repeat controls would not be possible.
If you want to use ids, assign them to an HTML element, not an XPages control. Even then you may find some unusual behaviour.
I would advise using classes. It’s better practice and produces consistent results.
Subject: re: css ids
sounds logic, I’ll give it a try.Thanks