Pon-3
Pon-3

Reputation: 143

How can I limit the border for a single element?

I have a list using li for my nav bar. I set a border-radius on my background so that it would be rounded. Now I just need to delete the border-left of the home element. Here are the snippets of code:

HTML:

<li class="home">
    <a href="<?php echo url('/'); ?>">home</a>
</li>

CSS:

li.home {
    border-left:0px;
}

I hope this is enough context to help answer my question. Please let me know if it isn't.

Upvotes: 0

Views: 90

Answers (2)

RbG
RbG

Reputation: 3193

if you dont want left border dont mention it..i.e dont write border:1px solid; or boder-left:1px;..only mention the borders you need like border-right or border-top and to have rounded edge use border-top-right-radius:10px;

EXAMPLE :: FIDDLE

Upvotes: 0

BitHigher
BitHigher

Reputation: 501

try li.home { border-left:0px !important; }

Upvotes: 1

Related Questions