1

I have the following selectors on my menu to apply a border radius to the first and last child of my menu

.main-nav ul li a:first-child {border-radius: 6px 0 0 6px!important;}
.main-nav ul li a:last-child {border-radius:  0 6px 6px 0!important;}

I even tried the !important addition to try and force this on, however it is not working and I can't see where it would be overridden, can anyone please advise how to get round this?

This the site.

rsanchez
  • 14,467
  • 1
  • 35
  • 46
Kirsty Marks
  • 483
  • 8
  • 29

3 Answers3

3

In your style sheet you have:

.main-nav ul li {
    float: left;
    background-color: #58585a; //remove this
    color: #ffffff;
}

Remove the background-color line from .main-nav ul li. It's showing under your menu items so you can't see the border radius.

meobyte
  • 1,320
  • 8
  • 15
0

Try this instead:

.main-nav ul li:first-child a {
    border-radius: 6px 0 0 6px!important;
}
.main-nav ul li:last-child a {
    border-radius:  0 6px 6px 0!important;
}
GreyRoofPigeon
  • 17,833
  • 4
  • 36
  • 59
0

Styles are applied to li element not to a element

try this:

.main-nav ul li:first-child {border-radius: 6px 0 0 6px!important;}
.main-nav ul li:last-child {border-radius:  0 6px 6px 0!important;}
Alessandro Minoccheri
  • 35,521
  • 22
  • 122
  • 171