-2

I have this scenario :

<ul>
    <li>
        <a href="/">Home</a>
    </li>

    <li class="page_item page-item-5 current_page_item">
        <a href="/help">Help</a>
    </li>

    <li class="page_item page-item-7">
        <a href="/follow">Follow</a>
    </li>
</ul>​

li
{
    margin-bottom:10px;
}

a
{
    border:1px solid #000000;
}

ul li + page_item a
{
    border:0;
}

and, how you an see, I'd like to remove border only on the first link with class page_item, with ul li + page_item a, but seems it doesnt works? ​

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
markzzz
  • 47,390
  • 120
  • 299
  • 507

3 Answers3

2

You were missing the . in front of your class selector.

Assuming your first li will never have the class and you just want to pick the li.page_item that comes after it, you can use this selector:

ul li:first-child + li.page_item a
{
    border:0;
}

But if you want the first li.page_item a to not have the border regardless of where it is, you'll need to go about this another way...

ul li.page_item a
{
    border:0;
}

a, ul li.page_item ~ li.page_item a
{
    border:1px solid #000000;
}
Community
  • 1
  • 1
BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
0

You use this code in css file

ul li.page_item a{
  border:0px none;
}
Saeed
  • 3,415
  • 3
  • 24
  • 41
0

You missed the class identifier (a dot)

Change the last part of your css:

ul li.page_item a
{
    border:none;
}

also a tip: use border:none; instead of border:0

PoeHaH
  • 1,936
  • 3
  • 28
  • 52