WebSite X5Help Center

 
Ludo Joosen
Ludo Joosen
User

Table problem  en

Auteur : Ludo Joosen
Visité 1272, Followers 1, Partagé 0  

I am trying to implement a table in my site. 

The code looks like this

<table>

<th>
<td class="col1"><strong><categorie</strong></td>
<td class="col2"><strong>omschrijving</strong></td>
<td class="col3"><strong>prijs</strong></td>
</th>

<tbody>

<tr>
<td>ontharing mannen</td>
<td>jukbeenderen</td>
<td>70</td>
</tr>
<tr>

... until the end

The result is completely different. The header for the first column is dropped and in the header a fourth column is added.

Posté le
7 RéPONSES - 2 UTILE
Ludo Joosen
Ludo Joosen
User
Auteur

Hello,

here's the complete listing.

Ludo

Lire plus
Posté le de Ludo Joosen
Paul M.
Paul M.
Moderator

Hello Ludo,

Edit the first part of the HTML as follows:

<th class="col1"><strong>categorie</strong></th>
<th class="col2"><strong>omschrijving</strong></th>
<th class="col3"><strong>prijs</strong></th>

instead of...

<th>
<td class="col1"><strong><categorie</strong></td>
<td class="col2"><strong>omschrijving</strong></td>
<td class="col3"><strong>prijs</strong></td>
</th>

Kind regards,

Paul

Lire plus
Posté le de Paul M.
Anthony A.
Anthony A.
User

Ludo you can use th tag as Paul pointed out for you or you can just simply use tr tag for your first row as well

<th><tr>
<td class="col1"><strong><categorie</strong></td>
<td class="col2"><strong>omschrijving</strong></td>
<td class="col3"><strong>prijs</strong></td>
</th></tr>

and remove the extra opening tag from categorie.

if this post is the correct answer, please mark this answer as correct answer.

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

Good Luck
http://www.nuluhost.com (6 months free for any x5 users, ask us about activation code)
http://www.wdesigners.us
http://www.usx5.com

Lire plus
Posté le de Anthony A.
Ludo Joosen
Ludo Joosen
User
Auteur

Anthony,

if you leave the <th> code in your column headings will automatically appear centred which gives it a better lay-out in my opinion.

Ludo

Lire plus
Posté le de Ludo Joosen
Anthony A.
Anthony A.
User

Hi Ludo, I check in my x5 program, even if you remove that th to tr and leave the td classes, resault is the same, it will show in the middle.

ofc the choice is yours, which ever works the best for you ;)

if this post is the correct answer, please mark this answer as correct answer.

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

Good Luck
http://www.nuluhost.com (6 months free for any x5 users, promo code: usx56m)
http://www.wdesigners.us
http://www.usx5.com

Lire plus
Posté le de Anthony A.
Jamie B.
Jamie B.
User

Or better still just view our tutorials on creating your own custom table in html5 and css3 on www.x5tuts.com

Lire plus
Posté le de Jamie B.