GeeCON Prague 2014*
The moose likes HTML, CSS and JavaScript and the fly likes how to include 2 or 3 buttons within a border or just simply a square? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to include 2 or 3 buttons within a border or just simply a square?" Watch "how to include 2 or 3 buttons within a border or just simply a square?" New topic
Author

how to include 2 or 3 buttons within a border or just simply a square?

Tom Barns
Ranch Hand

Joined: Oct 27, 2000
Posts: 138
Hi all
what i need to do is to put 2 o3 o3 4 buttons or textfield within a square or a border,i do not want to use border with table.it is not what i want.
simply i need to see 3 or more buttons or textfield and around them a square,also i need to specify the color of that square or lines .
Thanks a lot for your time.

Thanks for your help.
Brian Glodde
Ranch Hand

Joined: Jun 27, 2001
Posts: 171
try using nested div's. you can then attach an onclick event to the div to simulate the button action. Here's a sample to get you started:
<div id="oustideborder" style="border:solid 1px #000000; width:100;height:50;">
<div id="btn1" style="position:relative;text-align:center;width:100;top:0px;left:0px;background-color:#FF0000;">Button 1</div>
<div id="btn2" style="position:relative;text-align:center;width:100;top:0px;left:0px;background-color:#00FF00;">Button 2</div>
<div id="btn3" style="position:relative;text-align:center;width:100;top:0px;left:0px;background-color:#0000FF;">Button 3</div>
</div>
You'll have to make some adjustments to get the same effect in Netscape (layer-background-color, etc). You get the picture.
 
GeeCON Prague 2014
 
subject: how to include 2 or 3 buttons within a border or just simply a square?