Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elements to 'look like' a bullet point list inside an anchor link

I am creating an element on my page like so:

<a href="">
<span class="benefits">
Free entry<br />
20% off in store<br />
First to know about latest courses
</span>
</a>

The client wants the whole area clickable, and the list of benefits to display with bullet points.

As far as i am aware lists cannot be placed inside anchor tags?

I had hoped I could insert a tag before hand that I could attach the css list-style-type rules to however that didn't work. I tried then making that element a fixed width and height with a background colour, however, it didnt display properly in IE6 - which I have to support.

Any ideas?

like image 966
Ant Ali Avatar asked Oct 06 '10 16:10

Ant Ali


2 Answers

Try using the HTML character entity &bull; which looks like this: •

<a href="">
<span class="benefits">
&bull; Free entry<br />
&bull; 20% off in store<br />
&bull; First to know about latest courses
</span>
</a>

more character entities here: http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references

like image 120
RBW_IN Avatar answered Nov 11 '22 12:11

RBW_IN


Maybe something like this could help:

a.error::before{    
    background-color: #be1c1c;
    border-radius: 1em;
    content: " ";
    display: inline-block;
    height: 0.35em;
    margin-right: 6px;
    width: 0.35em;
}
a.error{
    color:#be1c1c;
    text-decoration:none;
    display:block;
}
ul {
    padding:1em;
    display: block;
    list-style-type: disc;
}
ul li{
    color:#be1c1c;
}
My links:
<a class="error" href="#"> item 1</a>
<a class="error" href="#"> item 2</a>
<a class="error" href="#"> item 3</a>
<br>
My list:
<ul>
  <li> item 1</li>
  <li> item 2</li>
  <li> item 3</li>
</ul>

Hope it help!

like image 28
Moun Sec Avatar answered Nov 11 '22 10:11

Moun Sec