Solved

2 more questions

Posted on 2003-11-20
5
188 Views
Last Modified: 2010-04-09
How can I speard out the 4 radio buttons across the available screen, evenly with the heading directly on top?


<table>
<thead>
<tr>
<th scope="col" style="width:100%;"></th>
<th scope="col">Poor</th>
<th scope="col">Average</th>
<th scope="col">Good</th>
<th scope="col">Excellent</th>
</tr>
</thead>
<tbody>

<tr>
<td scope="row" align="left"></td>
<td align=center><input type="radio" name="q12" value="poor"></td>
<td align=center><input type="radio" name="q12 value="average"></td>
<td align=center><input type="radio" name="q12" value="good"></td>
<td align=center><input type="radio" name="q12" value="excellent"></td>
</tr>

</tbody>
</table>
_______________________________________

2. How can I do the following table, having the raio button directly under the heading, but without using the <th> tag


<table>
<thead>
<tr>
<th scope="col" style="width:100%;"></th>
<th scope="col">Poor</th>
<th scope="col">Average</th>
<th scope="col">Good</th>
<th scope="col">Excellent</th>
</tr>
</thead>
<tbody>

<tr>
<td scope="row" align="left"></td>
<td align=center><input type="radio" name="q12" value="poor"></td>
<td align=center><input type="radio" name="q12 value="average"></td>
<td align=center><input type="radio" name="q12" value="good"></td>
<td align=center><input type="radio" name="q12" value="excellent"></td>
</tr>

</tbody>
</table>
0
Comment
Question by:PieP
  • 2
  • 2
5 Comments
 
LVL 3

Expert Comment

by:pbguy
ID: 9789859
Think this is what you're looking for

1.

<table  WIDTH="100%">

      <tr>
            
            <th scope="col" WIDTH="25%">Poor</th>
            <th scope="col" WIDTH="25%">Average</th>
            <th scope="col" WIDTH="25%">Good</th>
            <th scope="col" WIDTH="25%">Excellent</th>
      </tr>

      <tr>
            <td align=center WIDTH="25%"><input type="radio" name="q12" value="poor"></td>
            <td align=center WIDTH="25%"><input type="radio" name="q12 value="average"></td>
            <td align=center WIDTH="25%"><input type="radio" name="q12" value="good"></td>
            <td align=center WIDTH="25%"><input type="radio" name="q12" value="excellent"></td>
      </tr>

</table>



2. Just replace the TH with TD

<table>
<thead>
<tr>
<td scope="col" style="width:100%;"></th>
<td scope="col">Poor</th>
<td scope="col">Average</th>
<td scope="col">Good</th>
<td scope="col">Excellent</th>
</tr>
</thead>
<tbody>

<tr>
<td scope="row" align="left"></td>
<td align=center><input type="radio" name="q12" value="poor"></td>
<td align=center><input type="radio" name="q12 value="average"></td>
<td align=center><input type="radio" name="q12" value="good"></td>
<td align=center><input type="radio" name="q12" value="excellent"></td>
</tr>

</tbody>
</table>


0
 

Author Comment

by:PieP
ID: 9795772
That's great pbguy.

But no. 2 was a crap example to give you. I tried to give a small example so it would be more answerable and I taugh I could figure it out from it....but no

Can you please do the same i.e. have the colums directly over the radio buttons, and can you position the radio buttons on the second half of the screen, evenly spread.
So the text is left aligned and the first button  starts 50% across the available screen area.

Sorry for the hassle and thanks a million.

Here's the table:
<table>
<thead>
<tr>
<td scope="col" style="width: 50%;"></td>
<td scope="col">Yes</td>
<td scope="col">No</td>
</tr>

</thead>
<tbody>

<tr>
<td scope="row" align="left">Fundamental research</td>
<td align=center><input type="radio" name="q17a" value="poor"></td>
<td align=center><input type="radio" name="q17a" value="average"></td>
</tr>


<tr>
<td scope="row" align="left">Industry/sector specific research</td>
<td align=center><input type="radio" name="q17b" value="poor"></td>
<td align=center><input type="radio" name="q17b" value="average"></td>
</tr>

<tr>
<td scope="row" align="left">Market flow research</td>
<td align=center><input type="radio" name="q17c" value="poor"></td>
<td align=center><input type="radio" name="q17c" value="average"></td>
</tr>


<tr>
<td scope="row" align="left">Technical analysis</td>
<td align=center><input type="radio" name="q17d" value="poor"></td>
<td align=center><input type="radio" name="q17d" value="average"></td>
</tr>

<tr>
<td scope="row" align="left">Intraday comments</td>
<td align=center><input type="radio" name="q17e" value="poor"></td>
<td align=center><input type="radio" name="q17e" value="average"></td>
</tr>

</tbody>
</table>
0
 

Author Comment

by:PieP
ID: 9795814
Oh and with the code you gave for no. 2
_____________________
<table>
<thead>
<tr>
<td scope="col" style="width:100%;"></th>
<td scope="col">Poor</th>
<td scope="col">Average</th>
<td scope="col">Good</th>
<td scope="col">Excellent</th>
</tr>
</thead>
<tbody>

<tr>
<td scope="row" align="left"></td>
<td align=center><input type="radio" name="q12" value="poor"></td>
<td align=center><input type="radio" name="q12 value="average"></td>
<td align=center><input type="radio" name="q12" value="good"></td>
<td align=center><input type="radio" name="q12" value="excellent"></td>
</tr>

</tbody>
</table>

-----------------------

how can I evenly space the buttons and button names evenly across the screen.

I increased the points a little cos' the question size grew larger.

Thanks again
0
 

Expert Comment

by:maverik_u
ID: 9796312
Hi,

    i think this will help,

1.

<table>
<thead>
<tr>
<td scope="col" style="width: 50%;"></td>
<td scope="col" align=center>Yes</td>
<td scope="col" align=center>No</td>
</tr>

</thead>
<tbody>

<tr>
<td scope="row" align="left">Fundamental research</td>
<td align=center><input type="radio" name="q17a" value="poor"></td>
<td align=center><input type="radio" name="q17a" value="average"></td>
</tr>


<tr>
<td scope="row" align="left">Industry/sector specific research</td>
<td align=center><input type="radio" name="q17b" value="poor"></td>
<td align=center><input type="radio" name="q17b" value="average"></td>
</tr>

<tr>
<td scope="row" align="left">Market flow research</td>
<td align=center><input type="radio" name="q17c" value="poor"></td>
<td align=center><input type="radio" name="q17c" value="average"></td>
</tr>


<tr>
<td scope="row" align="left">Technical analysis</td>
<td align=center><input type="radio" name="q17d" value="poor"></td>
<td align=center><input type="radio" name="q17d" value="average"></td>
</tr>

<tr>
<td scope="row" align="left">Intraday comments</td>
<td align=center><input type="radio" name="q17e" value="poor"></td>
<td align=center><input type="radio" name="q17e" value="average"></td>
</tr>

</tbody>
</table>

-------
2.
 can u tell me any specific reason for which u r using an empty td in this table .... and the also why the scope attribute in <td>
0
 
LVL 3

Accepted Solution

by:
pbguy earned 75 total points
ID: 9797517
Maverick - think ya just missed the WIDTH on the table tag.

I think we may have it now, how about :

(just copy the whole thing into your file...)

<B>Radio Button Centered between 50% and 75% and between 75% and 100%</B>
<B>

<table WIDTH="100%">
      <thead>
      <tr>
            <td scope="col" WIDTH="50%" align="left"></td>
            <td scope="col" WIDTH="25%" align="CENTER">Yes</td>
            <td scope="col" WIDTH="25%" align="CENTER">No</td>
      </tr>

      </thead>
      <tbody>

      <tr>
            <td scope="row"  WIDTH="50%" align="left">Fundamental research</td>
            <td align="center" WIDTH="25%">
                  <input type="radio" name="q17a" value="poor">
            </td>
            <td align="center" WIDTH="25%">
                  <input type="radio" name="q17a" value="average">
            </td>
      </tr>


      <tr>
            <td scope="row" align="left" WIDTH="50%">Industry/sector specific research</td>
            <td align="center" WIDTH="25%">
                  <input type="radio" name="q17b" value="poor">
            </td>
            <td align="center" WIDTH="25%">
                  <input type="radio" name="q17b" value="average">
            </td>
      </tr>

      <tr>
            <td scope="row" align="left" WIDTH="50%">Market flow research</td>
            <td align="center" WIDTH="25%">
                  <input type="radio" name="q17c" value="poor">
            </td>
            <td align="center" WIDTH="25%">
                  <input type="radio" name="q17c" value="average">
            </td>
      </tr>


      <tr>
            <td scope="row" align="left" WIDTH="50%">Technical analysis</td>
            <td align="center" WIDTH="25%">
                  <input type="radio" name="q17d" value="poor">
            </td>
            <td align="center" WIDTH="25%">
                  <input type="radio" name="q17d" value="average">
            </td>
      </tr>

      <tr>
            <td scope="row" align="left" WIDTH="50%">Intraday comments</td>
            <td align="center" WIDTH="25%">
                  <input type="radio" name="q17e" value="poor">
            </td>
            <td align="center" WIDTH="25%">
                  <input type="radio" name="q17e" value="average">
            </td>
      </tr>

      </tbody>
</table>




<P>

<B>Radio Button Starts Exactly at middle of screen </B>

<BR>

<table WIDTH="100%">
      <thead>
      <tr>
            <td scope="col" WIDTH="50%" align="left"></td>
            <td scope="col" WIDTH="25%" align="LEFT">Yes</td>
            <td scope="col" WIDTH="25%" align="LEFT">No</td>
      </tr>

      </thead>
      <tbody>

      <tr>
            <td scope="row"  WIDTH="50%" align="left">Fundamental research</td>
            <td align="LEFT" WIDTH="25%">
                  <input type="radio" name="q17a" value="poor">
            </td>
            <td align="LEFT" WIDTH="25%">
                  <input type="radio" name="q17a" value="average">
            </td>
      </tr>


      <tr>
            <td scope="row" align="left" WIDTH="50%">Industry/sector specific research</td>
            <td align="LEFT" WIDTH="25%">
                  <input type="radio" name="q17b" value="poor">
            </td>
            <td align="LEFT" WIDTH="25%">
                  <input type="radio" name="q17b" value="average">
            </td>
      </tr>

      <tr>
            <td scope="row" align="left" WIDTH="50%">Market flow research</td>
            <td align="LEFT" WIDTH="25%">
                  <input type="radio" name="q17c" value="poor">
            </td>
            <td align="LEFT" WIDTH="25%">
                  <input type="radio" name="q17c" value="average">
            </td>
      </tr>


      <tr>
            <td scope="row" align="left" WIDTH="50%">Technical analysis</td>
            <td align="LEFT" WIDTH="25%">
                  <input type="radio" name="q17d" value="poor">
            </td>
            <td align="LEFT" WIDTH="25%">
                  <input type="radio" name="q17d" value="average">
            </td>
      </tr>

      <tr>
            <td scope="row" align="left" WIDTH="50%">Intraday comments</td>
            <td align="LEFT" WIDTH="25%">
                  <input type="radio" name="q17e" value="poor">
            </td>
            <td align="LEFT" WIDTH="25%">
                  <input type="radio" name="q17e" value="average">
            </td>
      </tr>

      </tbody>
</table>


<P>
 
<B>Evenly Spaced</B>
<BR>
Just use percentages for column widths
<BR>
Need to kill that first column - it takes up the entire width of the table at 100%

<BR>
 
<table WIDTH="100%">
<thead>
<tr>
<td scope="col" WIDTH="25%" ALIGN="CENTER">Poor</th>
<td scope="col" WIDTH="25%" ALIGN="CENTER">Average</th>
<td scope="col" WIDTH="25%" ALIGN="CENTER">Good</th>
<td scope="col" WIDTH="25%" ALIGN="CENTER">Excellent</th>
</tr>
</thead>
<tbody>

<tr>
<td align=center WIDTH="25%"><input type="radio" name="q12" value="poor"></td>
<td align=center WIDTH="25%"><input type="radio" name="q12 value="average"></td>
<td align=center WIDTH="25%"><input type="radio" name="q12" value="good"></td>
<td align=center WIDTH="25%"><input type="radio" name="q12" value="excellent"></td>
</tr>

</tbody>
</table>

0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now