Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can't remove border

I can't remove border from my images. I've tried many times with different atributes. Still see white border. If you have any suggestion what causes the problem - please explain to me. I'm kinda newbie.

<head>
    <style>
    img{
    border : none;
    text-decoration: none;
    }
    #forum
    {
        background:url(forum_button.png) 0px 0px no-repeat; 
        width: 300px; 
        height: 81px;

    }
    #forum:hover
    {
        background:url(forum_button.png) -300px 0px no-repeat; 
        width: 300px; 
        height: 81px;
    }
    #facebook
    {
        background:url(social_buttons.png) 0px 0px no-repeat;
        width: 29px; 
        height: 29px;
    }
    #facebook:hover
    {
        background:url(social_buttons.png) 0px -33px no-repeat;
        width: 29px; 
        height: 29px;
    }
    #twitter
    {
        background:url(social_buttons.png) -31px 0px no-repeat;
        width: 29px; 
        height: 29px;
    }
    #twitter:hover
    {
        background:url(social_buttons.png) -31px -33px no-repeat;
        width: 29px; 
        height: 29px;
    }
    </style>
    </head>
    <body style="background:url(landing.png) no-repeat top #111111; width: 1280px; height: 1024px; border:0;">
    <a href="#"><img id="forum" /></a>
    <div id="social">
    <a href="#"><img id="facebook"></a>
    <a href="#"><img id="twitter"></a>
    </div>
like image 917
Ivelios Avatar asked Sep 23 '13 14:09

Ivelios


People also ask

Why can't I erase a border in Excel?

Click Home > the Borders arrow > Erase Border, and then select the cells with the border you want to erase. If the above steps don't work for you, to narrow down this issue, it's first recommended to create a new Excel workbook to see the result.


1 Answers

It's because an img tag MUST have a src="" with a proper link otherwise it will be showing the image as a background like in your case (because of the css on the img) and a broken image on top of it

="#"><img id="facebook"></

It's not a border, what you see is the broken image border.

If you want to keep your code, change the img tag to a div..

like image 69
Magnus Avatar answered Oct 14 '22 01:10

Magnus