The_Murker
Joined: Jan 30, 2011
|
  Posted:
May 12, 2012 - 19:49 |
|
What I seem to care most about on FUMBBL is making my team page
look pretty. I'd like to add stuff upon stuff, walls of text full of fluff, but for length top to bottom, enough is enough.
This OLD team page has buttons side by side. I've played with my html-ISH code or what ever it is, but can't manage the proper code to get the buttons side by side. A new button starts a new line, making the page even longer.
Could someone post a bit of code with two or three buttons that will appear side by side. And maybe another button that will start a new line so I can see the difference. Thanks for any help. |
|
|
Shraaaag
Joined: Feb 15, 2004
|
  Posted:
May 12, 2012 - 19:58 |
|
This is the code I used:
Code: | <input style='width:150px;' type="button" value="Show team statistics" onclick="x=document.getElementById('team_statistics');if(x.style.display != 'none'){x.style.display = 'none';this.value='Show team statistics'}else{x.style.display = 'block';this.value='Hide team statistics';}" /><!--
--><input style='width:150px;' type="button" value="Show statistics" onclick="x=document.getElementById('statistics');if(x.style.display != 'none'){x.style.display = 'none';this.value='Show statistics'}else{x.style.display = 'block';this.value='Hide statistics';}" /><!--
--><input style='width:150px;' type="button" value="Show team" onclick="x=document.getElementById('team');if(x.style.display != 'none'){x.style.display = 'none';this.value='Show team'}else{x.style.display = 'block';this.value='Hide team';}" /> |
|
_________________
|
|
The_Murker
Joined: Jan 30, 2011
|
  Posted:
May 12, 2012 - 20:03 |
|
Thanks. I'll play with it a bit before more SFQ's. |
_________________
Join the wait-list. Watch the action. Leave the Empire. Come to Bretonnia! |
|
BrianLohan
Joined: May 22, 2012
|
  Posted:
May 22, 2012 - 10:04 |
|
Yeah,Code is also running flawlessly for me.Is it possible for inherit the class wit reference? |
_________________ australia air charter |
|
cowhead
Joined: Oct 22, 2006
|
  Posted:
May 24, 2012 - 08:36 |
|
Is there any way to replace the button with an image? |
_________________
|
|
Shraaaag
Joined: Feb 15, 2004
|
  Posted:
May 24, 2012 - 19:17 |
|
cowhead wrote: | Is there any way to replace the button with an image? |
Yes
Code: | <input type="image" src="URL OF IMAGE" onclick="x=document.getElementById('divID');if(x.style.display != 'none'){x.style.display = 'none';}else{x.style.display = 'block';}" />
<div id="divID" style="display:none;">HIDDEN CONTENT</div> |
Example:
https://fumbbl.com/FUMBBL.php?page=team&team_id=601732 |
_________________
|
|
The_Murker
Joined: Jan 30, 2011
|
  Posted:
May 24, 2012 - 19:29 |
|
Shraaaaaag = my new favorite. |
_________________
Join the wait-list. Watch the action. Leave the Empire. Come to Bretonnia! |
|
cowhead
Joined: Oct 22, 2006
|
  Posted:
May 24, 2012 - 21:26 |
|
Thanks Shraaaag, very much appreciated. |
_________________
|
|
Dalfort
Joined: Jun 23, 2008
|
  Posted:
May 24, 2012 - 21:47 |
|
The_Murker wrote: | Shraaaaaag = my new favorite. |
have you seen his awesome scripts? for compiling your teams/players stats?
Link
Shraaaag my favourite for a long time |
|
|
The_Murker
Joined: Jan 30, 2011
|
  Posted:
Aug 24, 2012 - 03:10 |
|
Hello again. I'm come back to this idea. After an hour of comparing my button script, and the script in your first reply, Shraaaag, I just can't get my button to line up. In the script above, I'm sure you left out some of the actual "content" that each button reveals. Forgive my ignorance, but could you (or anyone) paste a script in it's entirety, content and all, so I can see where I am going wrong. I might just be missing a squiggle, exclamation point, or perhaps ending with a space instead of an enter... ..*???*
Just to compare.. here is the button script I use to reveal 'kill icons' and some text on my Kingston bio page. One button on top of the other. Could someone be so kind as to modify it so that the buttons stay in line? Or maybe just point out the difference in the code. I notice I have some <div> </div> type stuff Shraaaag's dosn't seem to. Could that be it?
Code:
<p align="center"><input type="button" value="Kills" onclick="x=document.getElementById('hide1');if(x.style.display != 'none'){x.style.display = 'none';this.value='Kills'}else{x.style.display = 'block';this.value='Hide Kills';}"><div id='hide1' style='display:none'><p align="center"><a href="http://fumbbl.com/FUMBBL.php?page=match&id=3155788"><img src="https://fumbbl.com/FUMBBL/Images/PlayerIcons/rotter1.gif"; title="Stinky" /></a></div><p align="center"><input type="button" value="My Dead" onclick="x=document.getElementById('hide2');if(x.style.display != 'none'){x.style.display = 'none';this.value='My Dead'}else{x.style.display = 'block';this.value='Hide My Dead';}"><div id='hide2' style='display:none'><p align="center"><a href="http://fumbbl.com/FUMBBL.php?page=match&id=3156953"><img src="https://fumbbl.com/FUMBBL/Images/PlayerIcons/hlineman1.gif"; title="Romeo" /></a><p align="center">Romeo is dead now!!</div> |
_________________
Join the wait-list. Watch the action. Leave the Empire. Come to Bretonnia! |
|
The_Murker
Joined: Jan 30, 2011
|
  Posted:
Aug 24, 2012 - 17:27 |
|
OK, after more experimentation, it seems my buttns will indeed appear side by side (a new button will not start a new line) only if the entire bio (HTML code?) uses ythe default alignment, meaning stays LEFT. If even one time I use the code <p align="center"> or <p align="left"> before I get to the buttons, the buttons no longer line up side to side. The reason mistifies me.
Is there another way to change between centering or left justifying the text, other than the "align" function?
Thanks in advance for any help. |
_________________
Join the wait-list. Watch the action. Leave the Empire. Come to Bretonnia! |
|
The_Murker
Joined: Jan 30, 2011
|
  Posted:
Aug 24, 2012 - 17:58 |
|
Got it. I'll just surround the entire previous bio with a <div> </div> division so the buttons will stay aligned left, and remain side by side. |
_________________
Join the wait-list. Watch the action. Leave the Empire. Come to Bretonnia! |
|
The_Murker
Joined: Jan 30, 2011
|
  Posted:
Aug 25, 2012 - 02:21 |
|
Well, getting the side by side buttons to work has allowed the Kingston Kruelty's Hall Of Fame to go in nicely. More players and portraits to follow, of course. I intend to modify and colorize one of knut_rockie's original Fumbbl portraits for each position. The Blitzer needs work, but it's my first attempt at such a thing. I'm finally working with "layers" in the paint program, so I amy be able to change the uniform colors quite easily if some human players want some cool custom player portraits for their team. What were the Bucs colors again? Pink and yellow? |
_________________
Join the wait-list. Watch the action. Leave the Empire. Come to Bretonnia! |
|
Wreckage
Joined: Aug 15, 2004
|
  Posted:
Aug 25, 2012 - 08:47 |
|
Hi, since this is about buttons... I have been wondering for a while now if it is possible to use some sort of 'buttons' more like images and such... is that possible? |
Last edited by Wreckage on %b %25, %2012 - %09:%Aug; edited 1 time in total |
|
Garion
Joined: Aug 19, 2009
|
  Posted:
Aug 25, 2012 - 09:04 |
|
Yup an image can be a button.
Code: | <input type="image" src="URL OF IMAGE" onclick="x=document.getElementById('divID');if(x.style.display != 'none'){x.style.display = 'none';}else{x.style.display = 'block';}" />
<div id="divID" style="display:none;">HIDDEN CONTENT</div> |
Example:
https://fumbbl.com/FUMBBL.php?page=team&team_id=601732 |
|
|
|