Real challenge :)

liunx

Guest
I trying to make my custom button,for this i use standart<br />
<button> html tag,like :<br />
<button id=mybutton1 >BrowserWarrior sucks!</button><br />
<br />
So here My question.It seems that paddign or something is automatically adjusted,so the longer text inside the tag,the more spaces inside the button i get,is this possible to<br />
get rid of those spaces,without stating the length of button,cause i wanna get it somewhat generic???<br />
<br />
I get:<br />
< BrowserWarrior sucks ><br />
I wanna get:<br />
<BrowserWarrior sucks><br />
without spaces.<br />
<br />
Another problem it's focus ,how i make it invisible ?<!--content-->here is the answer to the spacing problem:<br />
<br />
<button style="WIDTH: 145px; HEIGHT: 24px">BrowserWarrior sucks!</button><br />
<br />
just adjust the width and height for each button, depending upon the text of the button.<!--content-->To hide it add the visibility attribute to the style in the button tag:<br />
<button style="WIDTH: 145px; HEIGHT: 24px; visibility: hidden"><!--content-->Thanx for the answers ,but it's not what i was asking for.<br />
I wanna get it generic,i don't know the length of the text inside the button.It may be "Close the window" or "Exit" or anything else.I get the string on the server,and put it in html,using some function ,that draws me this button.( using asp).<br />
If it's not possible to get rid of spaces,is there are some way on Client to know the length of the text inside the button ?<br />
And i still wait for the answer about hiding focus and selection.No ,i don't want to make button invisible :)<br />
Thanks in advance.<!--content-->This is a script I wrote for someone on SiteOwnersForums. <br />
<!-- m --><a class="postlink" href="http://simpletexthtml.tripod.com/eureka/divButton.htm">http://simpletexthtml.tripod.com/eureka/divButton.htm</a><!-- m --><br />
<br />
See if this doesn't accomplish what you want for the button. You can use JavaScript and the string.length object.property method to determin the length of the code that will be in the button. To keep the focus off the button you can us the JavaScript eventhandeler onFocus() in conjunction with onBlur().<!--content-->
 
Back
Top