1

I've got a simple table.

<table border="1" width="100%">
        <tr>
                <th>Select</th>
                <th>Name</th>
                <th>Preview</th>
        </tr>

How do I set the width so the Select and Preview be 15px and Name be rest of the width left ???

4 Answers 4

3

Hey now you can define in your css as like this

Css

   .some{
    width:15px;
    }

HTML

<table border="1" width="100%">
        <tr>
                <th class="some">Select</th>
                <th>Name</th>
                <th  class="some">Preview</th>
        </tr>
</table>

live demo http://tinkerbin.com/n4Q1NOXW

Sign up to request clarification or add additional context in comments.

Comments

1
<table border="1" width="100%">
        <tr>
                <th width="15">Select</th>
                <th>Name</th>
                <th width="15">Preview</th>
        </tr>

Comments

1

you can use as

<table border="1" width="100%">
   <tr>
        <th width="15px">Select</th>
        <th>Name</th>
        <th width="15px">Preview</th>
   </tr>

Comments

0
<table border="1px" width="100%">
   <tr>
        <th width="15px">Select</th>
        <th>Name</th>
        <th width="15px">Preview</th>
   </tr>
</table>​​​​​​​​​​​​​​​​​​​​​

If you want to preview in any size screen according to their size, use '%' to determine the size. For ex

<table border="1px" width="100%">
   <tr>
        <th width="15%">Select</th>
        <th>Name</th>
        <th width="15%">Preview</th>
   </tr>
</table>​​​​​​​​​​​​​​​​​​​​​

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.