14 coaches online • Server time: 06:06
Forum Chat
Log in
Recent Forum Topics goto Post Gnomes are trashgoto Post ramchop takes on the...goto Post Chaos Draft League R...
SearchSearch 
Post new topic   Reply to topic
View previous topic Log in to check your private messages View next topic
darkwing2k6



Joined: Jun 28, 2007

Post   Posted: Jan 06, 2009 - 03:19 Reply with quote Back to top

hi guys, can anyone tell me how to change the length of an html button?

this is the code-

Code:


<p align="center"><input  type="button"  value="Show Custom Icons " onclick="x=document.getElementById('hide1');if(x.style.display != 'none'){x.style.display = 'none'; this.value='Show Custom Icons'}else{x.style.display = 'block';this.value='Hide Custom Icons';}"><div id=hide1 style='display:none'><h2>Click on Image to Download Icon Set</h2><a href="http://www.geocities.com/darkwing2k6@ymail.com/SkarBayFCIcons.zip"><img border="2" src="http://www.geocities.com/darkwing2k6@ymail.com/SBFC-Complete-Icon-Set.gif"></a></div></p>



im trying to get all the buttons on this team the same length to make it tidier.

http://fumbbl.com/FUMBBL.php?page=team&op=view&team_id=503834

any help is greatly appreciated Smile

cheers
john
Emrys



Joined: Jun 05, 2008

Post   Posted: Jan 06, 2009 - 03:32 Reply with quote Back to top

Just add
Code:
style="width:200px;"
to the input button code - e.g.
Code:
<input  type="button" style="width:200px;" value="Show Custom Icons " onclick ...


You'll probably want the buttons to be wider than 200 pixels, though, so just increase the 200 to a more appropriate length.

_________________
Nuffle hates me, this I know
For the dice rolls tell me so
darkwing2k6



Joined: Jun 28, 2007

Post   Posted: Jan 06, 2009 - 03:55 Reply with quote Back to top

thanks emrys but it doesnt work Sad when i paste it in and update bio, the box goes really small then on first click goes back to normal. then when i go to change pixel width in bio the -->style="width:200px;"<-- has disappeared completely. thx for trying mate.
Emrys



Joined: Jun 05, 2008

Post   Posted: Jan 06, 2009 - 04:03 Reply with quote Back to top

Ah, but the code for your first button currently says:
Code:
<input  type="button" Show Custom Icons " onclick=...


rather than:
Code:
<input  type="button" value="Show Custom Icons" style="width:200px;" onclick=...


so it's not any style which is causing the problem - perhaps a copy/paste has gone awry somewhere.

I find it easier to do the coding offsite (in Notepad, for example) and then copy/paste the whole block of code into the edit window, simply because it's easier to double-check that the code looks ok.

_________________
Nuffle hates me, this I know
For the dice rolls tell me so
darkwing2k6



Joined: Jun 28, 2007

Post   Posted: Jan 07, 2009 - 15:23 Reply with quote Back to top

hi again mate, ive tried putting the - style="width:200px;" - as you have in the above example but still no joy im afraid Sad thx for the help though buddy, much appreciated
Woodstock



Joined: Dec 11, 2004

Post   Posted: Jan 07, 2009 - 15:25 Reply with quote Back to top

Style tag of the button, XXXX is the width. The other options are not needed of course.

Code:
style='width:XXXXpx;font-size:10px;margin:0px;padding:0px;'



Btw, be sure to use ' instead of ".
darkwing2k6



Joined: Jun 28, 2007

Post   Posted: Jan 07, 2009 - 15:46 Reply with quote Back to top

yeeehaaaaa!!!!! thx woodstock, it was as simple as changing the " for a ' thanks for your help Very Happy
Display posts from previous:     
 Jump to:   
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Log in to check your private messages View next topic