html - pseudo-class :last-child weirdness -


i'd last menu item blue, , i'm trying use psuedo-class a:last child accomplish this. weird thing is, it's applying rule seemingly random a:link in middle of menu. can tell me why?

site: http://www.robert-wright-books.com/stage

css:

#access {  background: transparent;  float: left;  font-size: 1.4em;  text-transform: uppercase;  overflow: hidden;  width: 238px;  margin: 36px 0 0 18px; } #access a:last-child {  color: #006ccf } #access ul {  list-style-type: none;  margin: 0;  padding: 0;  margin-bottom: 0; } #access ul li { border-bottom: 1px dotted #957e5e } #access ul li:last-child { border-bottom: none } #access ul li a, #access ul li a:hover, #access ul li a:visited {  color: #432f00;  display: block;  padding: 6px 24px;  line-height: 17px;  text-decoration: none; } 

consider #access a a child of #access, rest of links wrapped in li, , therefore li child, not a.

#access ul li:last-child a points last menu item.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -