Oh yeah - it’s actually working now. Could have been because I commented out some code earlier and forgot to uncomment.
Could I ask another question? How do I set the links globally? I’ve found that if I specifically set a rule for a particular as follows that this works but only for the links in that div:
Well, closer to the top of your stylesheet, you could have
a {
styles;
}
a:visited {
styles;
}/only mention if you want visited styles/
a:focus, a:hover, a:active {
styles;
}
then your current styles will override the global styles because they are more specific:
div#content_main a:link, div#content_main a:visited
“a” alone can set styles for all the :pseudoclass versions, which is nice because then you only need to mention the :pseudoclass versions for what you want different.
Like if the only difference between regular and hovered/focussed links is an underline, then “a” has all the styles and then :hover and :focus have just the line about the text-decoration.
Just to clarify, I’m trying to get the links which are inside the li elements which are inside the ul to center vertically. I thought that if I centered the ul then the others would be centered too but this has happened.
I’d need to see the html that goes with that or a link to the page.
Looking at the css is seems that your ul is already centred. The div is 37px high and the ul is 37px high therefore it is already centred (assuming you have removed the top and bottom margins form the ul).