Turn Off Alt Tags On Links With CSS?

后端 未结 6 1954
青春惊慌失措
青春惊慌失措 2021-01-17 22:19

This website that I\'m working on has annoying alt tags popping up when you hover over links in the sidebar. I didn\'t put these alt tags in. But, I can control the CSS... I

6条回答
  •  暖寄归人
    2021-01-17 22:42

    Dear stackoverflow members, I wanted to remove the img alt attribute, to remove the alt thing, with css, without changing html php, or adding java elements.
    I wanted simply this box (border) around the image that is appearring to be removed. I could not find anywhere this simple solution! So i post it here! I hoep will help someone! I include a screenshot.

    I made height and width to be exact with the picture, no more, no less. Also, check that font-size attribute element was set to 0.

    That is (dependign on other set attributes, you may also need to adjust them, in order this "box" be adjusted to the exact size of your image:

    #your_specific_ID_name .image_myclass_image {
       background-position: 0px 0px;
       height: 'the height of your image';
       width: 'the width of your image';
       font-size: 0;
    }
    

提交回复
热议问题