Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add a image using Href Id , using CSS

Tags:

html

jquery

css

I am working on a wordpress website ,

Where i need to add a image before Hyper link , but i am failed to do so.

enter image description here

I have this for href , and i need image above these links

enter image description here

but i am failed , so far i tried to write css is

 background: url("outline.png") no-repeat 6px center;
  width: 100px;
  height: 100px;
  display: block;

but its not showing perfectly, also somepart of image going in background , i also tried Z-Index : 99999 , to show on top.

like image 825
Daiyan Avatar asked Dec 06 '25 13:12

Daiyan


1 Answers

you can try using :before element. Here is the code based on your site

a#launch-tab-4:before {
    content: " ";
    width: 100px;
    height: 100px;
    display: block;
    background: #00aa00;
}
a#development-tab-4:before {
    content: " ";
    width: 126px;
    height: 100px;
    display: block;
    background: #eeaaff;
}
a#planning-tab-4:before {
    content: " ";
    width: 100px;
    height: 100px;
    display: block;
    background: #00eeff;
}
a#brainstorming-tab-4:before {
    content: " ";
    width: 100px;
    height: 100px;
    display: block;
    background: #000;
}

it should look like this screen shoot

replace the colors with your images and you may adjust the width and height

like image 88
Temani Afif Avatar answered Dec 08 '25 03:12

Temani Afif



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!