HTML table problem

.net , css Belgium
  • 13 years ago

    I'm working an a website, and i wanted to create a structure using a table. But for some reason it doesn't really look like i want it to. The second and third line for example are not on 25%. Can anyone help me out here, The code is the following:

     

     

    <table border="1" width="100%">
                <tr width="100%">
                    <td width="100%">
                        <img src="../../../images/activetext.PNG" alt="ActiveText" border="0">
                    </td>
                </tr>
                <tr width="100%">
                    <td width="25%">
                        <b>
                            Date added:
                        </b>
                    </td>
                    <td width="25%">
                        <b>
                            Requirements:       
                        </b>
                    </td>
                    <td width="25%">
                        <b>
                            License:
                        </b>
                    </td>
                    <td width="25%">
                        <b>
                            File size:
                        </b>
                    </td>
                </tr>
                <tr width="100%">
                    <td width="25%">
                        May 21st 2007
                    </td>
                    <td width="25%">
                        .Net Framework 1.1 or higher
                    </td>
                    <td width="25%">
                        Freeware
                    </td>
                    <td width="25%">
                        93,5 kb
                    </td>
                </tr>
                <tr width="100%">
                    <td width="100%">
                        <b>
                            About ActiveText:
                        </b>
                    </td>
                </tr>
                <tr width="100%">
                    <td width="100%">
                        ActiveText is a simple text editor, very similar to notepad.
                    </td>
                </tr>
                <tr width="100%">
                    <td width="100%">
                        <b>
                            History
                        </b>
                    </td>
                </tr>
                <tr width="100%">
                    <td width="100%">
                        26/12/06 - V 1
                        <br />05/02/07 - V 2    Adds the Read function
                        <br />21/05/07 - V 2.1 Fixes the e-mail bug
                    </td>
                </tr>
                <tr width="100%">
                    <td width="100%">
                        <b>
                            Format
                        </b>
                    </td>
                </tr>
                <tr width="100%">
                    <td width="100%">
                        .ZIP
                    </td>
                </tr>
                <tr width="100%">
                    <td width="100%">
                        De Creative Commons Naamsvermelding-Geen Afgeleide werken 2.0 België Licentie is van toepassing op dit werk. Ga naar http://creativecommons.org/licenses/by-nd/2.0/be/ of stuur een brief naar Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, VS om deze licentie te bekijken.
                    </td>
                </tr
            </table>

  • 13 years ago

     try this:

     

    <table border="1" style="width:100%">
                <tr>
                    <td colspan="4">
                        <img src="../../../images/activetext.PNG" alt="ActiveText" style="border:0" />
                    </td>
                </tr>
                <tr style="width:100%">
                    <td style="width:25%">
                        <b>
                            Date added:
                        </b>
                    </td>
                    <td style="width:25%">
                        <b>
                            Requirements:      
                        </b>
                    </td>
                    <td style="width:25%">
                        <b>
                            License:
                        </b>
                    </td>
                    <td style="width:25%">
                        <b>
                            File size:
                        </b>
                    </td>
                </tr>
                <tr style="width:100%">
                    <td style="width:25%">
                        May 21st 2007
                    </td>
                    <td style="width:25%">
                        .Net Framework 1.1 or higher
                    </td>
                    <td style="width:25%">
                        Freeware
                    </td>
                    <td style="width:25%">
                        93,5 kb
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <b>
                            About ActiveText:
                        </b>
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        ActiveText is a simple text editor, very similar to notepad.
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <b>
                            History
                        </b>
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        26/12/06 - V 1
                        <br />05/02/07 - V 2    Adds the Read function
                        <br />21/05/07 - V 2.1 Fixes the e-mail bug
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <b>
                            Format
                        </b>
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        .ZIP
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        De Creative Commons Naamsvermelding-Geen Afgeleide werken 2.0 België Licentie is van toepassing op dit werk. Ga naar http://creativecommons.org/licenses/by-nd/2.0/be/ of stuur een brief naar Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, VS om deze licentie te bekijken.
                    </td>
                </tr>
            </table>

     Joe

    PS. 25% etc is always relative to 'window' size so it may not always look "correct".
     

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” - Brian Kernighan