Topic: Setting CSS with PHP Question
I am wondering of someone could offer an assistance with this problem I am trying to resolve. I have a left column navigation system that is generated based on if a user is logged in and the level of access the user has. I have created 3 navigation boxes that "stack" on top of each other. All of the boxes are wrapped in a div. The boxes have a header with a background color and the box has a 1 px solid border. the navigation is generated buy using a unordered list with list-style-type set to none. I set background colors for each list item for link and hover, etc. I also have a top border on each list item to create a button effect using css rather than JS and images.
Here is the problem. I dont one the first item in each list to have a border so I was thinking a creating a special rule that would be applied only to the top list item in the navigation. since the menu is generated differently for different usergroups, I need to dynamically apply this rule "class" using PHP. Any thoughts on how I could do this? Should I take the procedural approach, and count rows and then check for the 1st row and apply the css rule ? Again I may be making this harder than it needs to be.
Thanks