0

I recently finished a website in wordpress and modified a template a bit. Now my customer wants a element before a text-links, so i tried adding a :before as shown

a:before {
    content:url('triangle.png');
    width:3px;
    height:5px;
    margin: 5px;
}

what it does, works great so far:

enter image description here

But my problem is that I have image links on my site as well, and it crashes my layout.

Is it possible to apply the a:before only for the links in the textarea ?

Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325
  • You have anchor tags in textarea? never did that before. Anyway, try `textarea a:before` instead of `a:before` in css. – Mr_Green Mar 28 '14 at 10:45
  • check thoroughly every webpage because you are not using specific class name for styling. There is 90% chance that the styling is also being applied to other anchor elements too. – Mr_Green Mar 28 '14 at 10:55
  • yeppp... still got problems here :/ http://puu.sh/7Mzgt.jpg – user3472227 Mar 28 '14 at 10:56
  • post the exact related html where you want to apply this stylings. we might able to help you :) (_ofcourse hide private content_) – Mr_Green Mar 28 '14 at 10:57
  • `textarea` contain raw data only. @Mr_Green `textarea a:before` this will not work – Rahil Wazir Mar 28 '14 at 11:56
  • @RahilWazir yeah I was confused with OP's statement: "_Is it possible to apply the a:before only for the links in the **textarea** ?_" – Mr_Green Mar 28 '14 at 12:07
  • I guess you are not really talking about the html element – Jeremy Zahner Mar 28 '14 at 15:54
  • can u post more of your code? – Moishy Mar 28 '14 at 20:27

1 Answers1

0

have you tried following:

a:before > img {
    content:"";
    width:3px; /*maybe these styles are also not necessary for your layout*/
    height:5px; /* then you can set them al to 0 */
    margin: 5px;
}
brobken
  • 358
  • 1
  • 12