Image with link is not opening the page

1

In my application I created the access to social networks of the company I work for. But when I click on the linked image, it does not open anything.

Follow the code below:

<a href="https://www.facebook.com/" target= "_blank" style="display:table;padding:15px;background:url('https://upload.wikimedia.org/wikipedia/commons/f/fb/Facebook_icon_2013.svg') center;background-size: 30px 30px;
                               background-repeat: no-repeat;margin-top: -80px;margin-left: 91%; position: absolute; "><a/>

                    <a href="https://br.linkedin.com/" target= "_blank" style="display:table;padding:15px; margin-top: 50%; background:url('https://upload.wikimedia.org/wikipedia/commons/c/c9/Linkedin.svg') center;background-size: 30px 30px;
                                 background-repeat: no-repeat; position: absolute; margin-top: -80px; margin-left: 95%; "><a/>              
    
asked by anonymous 18.10.2017 / 19:43

2 answers

0

As you are using elements with background, they do not take the size of the image, you need to set width and height for the elements, in the example below I put only the sizes and took the margins to show on the screen. I did a test on a page here and the link April, only in the StackOverflow console is not running.

<a href="https://www.facebook.com/" target= "_blank" style="display:table;padding:15px;background:url('https://upload.wikimedia.org/wikipedia/commons/f/fb/Facebook_icon_2013.svg') center;background-size: 30px 30px;background-repeat: no-repeat;margin-top:0;margin-left: 0; position: absolute;width:50px;height:50px;"><a/>

<a href="https://br.linkedin.com/" target= "_blank" style="display:table;padding:15px; margin-top: 50%; background:url('https://upload.wikimedia.org/wikipedia/commons/c/c9/Linkedin.svg') center;background-size: 30px 30px;background-repeat: no-repeat; position: absolute; margin-top:50px;margin-left:0;width: 50px;height:50px;"><a/>
    
18.10.2017 / 19:52
0

Remembering that tag 'a' closes '' and not '', I copied your html and just changed it and it is working normally.

    
19.10.2017 / 18:18