Reputation: 28384
I've been trying to get this working for a really long time and am totally stumped. There are tons of articles on the net on how to make a basic CSS list menu, but I'm wanting to make one that looks like this:
Line 1 >>
Line 2 >>
Line 3 >>
Where all of each line is a link (the text, whitespace, and arrows).
I've tried everything I can think of and nothing has worked. I'm sure this is pretty simple to do if you know what you're doing, so can anyone help me out?
Here is what I currently have:
<style type="text/css">
ul.menu {
padding: 0;
margin: 0;
font-size: 16px;
}
ul.menu > li {
display: block;
width: 100%;
}
ul.menu > li:hover {
color: red;
}
ul.menu > li a {
display: block;
width: 100%;
}
ul.menu > li > a:hover {
background-color: #F7F7F7;
}
</style>
<ul class="menu">
<li>
<a href="">Line 1</a>
</li>
<li>
<a href="">Line 2</a>
</li>
<li>
<a href="">Line 3</a>
</li>
<li>
<a href="">Line 4</a>
</li>
</ul>
Upvotes: 1
Views: 1597
Reputation: 7380
You can use css :after
properties to achieve this.
DEMO http://jsfiddle.net/yeyene/dnPN4/
ul.menu > li a:after {
content:" »";
}
Upvotes: 3
Reputation: 11450
Quickest way is with a background image (set on the li
or a
, depending your design needs):
background:transparent url("http://placehold.it/25x25") right center no-repeat;
http://jsfiddle.net/daCrosby/8aTvn/1/
Upvotes: 3