d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Need Assistance Please!
Add Reply New Topic New Poll
Member
Posts: 14,649
Joined: Nov 16 2005
Gold: 1.00
Jun 19 2013 02:30pm
Hey guys, trying to make a website, and I'm having trouble with image buttons.

Here is my code

<div>
<a id="Home Button" style="padding: 0; border:0" href="http://ogbhop.aoudevcommunity.com/index.php" title="OG Clan Forum" >
<button><img src="homebutton.png" style="border:none; padding:0; background:transparent;"></button>
</a>
</div>


My problem, even though I'm specifying no border, no padding, and transparent background , Im STILL getting a border on my images! I've swapped "none" and "0" for everything, still doesn't work. I've moved style around still not working like I want it to. Really irritating :(

Any help GREATLY appreciated!
Member
Posts: 2,757
Joined: Nov 26 2007
Gold: 1,214.81
Jun 19 2013 02:40pm
you have to use a style on button

<div>
<a id="Home Button" style="padding: 0; border:0" href="http://ogbhop.aoudevcommunity.com/index.php" title="OG Clan Forum" >
<button style="padding: 0; border: none;" ><img src="homebutton.png" padding:0; background:transparent;"></button>
</a>
</div>

This post was edited by labatymo on Jun 19 2013 02:41pm
Member
Posts: 14,649
Joined: Nov 16 2005
Gold: 1.00
Jun 19 2013 02:44pm
Quote (labatymo @ Jun 19 2013 08:40pm)
you have to use a style on button

<div>
<a id="Home Button" style="padding: 0; border:0" href="http://ogbhop.aoudevcommunity.com/index.php" title="OG Clan Forum" >
<button style="padding: 0; border: none;" ><img src="homebutton.png"  padding:0; background:transparent;"></button>
</a>
</div>


AH! THANK YOU! I figured out what I did wrong!


<div>
<a id="Home Button" href="http://ogbhop.aoudevcommunity.com/index.php" title="OG Clan Forum" >
<button style="padding: 0; border: 0; background:transparent;" ><img src="homebutton.png"></button>
</a>
</div>

This worked perfectly!
Member
Posts: 29,723
Joined: Jun 11 2007
Gold: 279.52
Jun 19 2013 07:37pm
wtf.

just do this.

Code
<div>
<a id="Home Button" href="http://ogbhop.aoudevcommunity.com/index.php" title="OG Clan Forum" > <img src="homebutton.png"></a>
</div>
Member
Posts: 14,067
Joined: Oct 8 2005
Gold: 352.12
Jun 20 2013 04:07pm
Quote (AkuuZ @ Jun 20 2013 01:37am)
wtf.

just do this.

Code
<div>
<a id="Home Button" href="http://ogbhop.aoudevcommunity.com/index.php" title="OG Clan Forum" > <img src="homebutton.png"></a>
</div>


Agreed man.

The idea of writing the code is, the less you have to do, the better. The more you write the more mistakes can happen.

Only style in the CSS mate and not inside your html tags as it starts to get messy
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll