Reputation: 387
The link text is right aligned. I would like to place the arrow image before the link text but don't want image to be linked. I put a print-shot example in the post.
#submitYourConcern {
background: url( '/_layouts/images/grey_arrow.png' ) no-repeat right;
padding-right: 15px;
color: #4b92db;
text-align: right;
}
<div id="submitYourConcern">
<a href="/submit.aspx">Submit Your Concern</a>
</div>
Upvotes: 2
Views: 10760
Reputation: 666
I think that you can use content
like this :
#submitYourConcern {
padding-right: 15px;
color: #4b92db;
}
#submitYourConcern::after {
content: url('http://i742.photobucket.com/albums/xx61/wendarra/Bullets/bullet_grey_arrow.png');
}
<div id="submitYourConcern">
<a href="/submit.aspx">Submit Your Concern</a>
</div>
Or use ::before
instead of ::after
if you want it in the other side.
Upvotes: 0
Reputation: 387
The following worked for me.
<style>
#submitYourConcern
{
color: #4b92db!important;
text-align: right;
}
#submitYourConcern:before{
content: url(/_layouts/images/grey_arrow.png);
padding-right: 5px;
}
</style>
Upvotes: 0
Reputation: 21
You can use ::after/::before
pseudo element to place things an element.
#submitYourConcern::before {
content: ">";
display:inline-block;
}
<div id="submitYourConcern">
<a href="/submit.aspx">Submit Your Concern</a>
</div>
Upvotes: 0
Reputation:
Create another div, put it in the concern div, set the background as the arrow, and align it where u want it. Or use ::before for adding stuff to the front Or use ::after for adding stuff to the back
Upvotes: 0
Reputation: 1226
You can use ::before
to place things before an element.
#submitYourConcern
{
background: url(/_layouts/images/grey_arrow.png) no-repeat right ;
padding-right: 15px;
color: #4b92db;
text-align: right;
}
#submitYourConcern::before {
content: ">";
display:inline-block;
}
<div id="submitYourConcern">
<a href="/submit.aspx">Submit Your Concern</a>
</div>
If you want to use an image, you can use background-image
Upvotes: 1