WebSite X5Help Center

 
Adrian B.
Adrian B.
User

HMTL inside table cell causes cell to expand in size  en

Author: Adrian B.
Visited 1243, Followers 2, Shared 0  

I've put some html inside a table cell - it works fine, does what its supposed to do (Its a paypal buy button). Functions properly when you click on it.

But the table cell does not ignore the cell content in terms of the cell size that it occupies in Table Object view.  In other words - the cell size in exported browser view is the same as in the Table Object view in X5.

How do I get the table cell to ignore the html content itself and display the cell size just to allow the button image to fit?

In the web authoring tool that I used to use, the html content is inside an html object box, and you could "size" the object box to fit inside any table cell - worked great.

Example attached of the deployed page.

Posted on the
6 ANSWERS
Esahc ..
Esahc ..
Moderator

Adrian, I do not know how to control the html cell height in a table, but given that you will probably create a responsive website, and in the knowledge that tables do not play nice on responsive pages, why not simply use objects on a page to replicate a table.

You can then have any type of cell (text/gallery/picture/html/social, etc) and the html object has an option to set the height.

With responsive layout you will then have total control of visible cells on a page.

Read more
Posted on the from Esahc ..
Adrian B.
Adrian B.
User
Author

Thanks - I have been playing with that - and it has promise. Just need to spend a little more time experimenting with adding more rows and columns and controlling the spacing.

Read more
Posted on the from Adrian B.
Esahc ..
Esahc ..
Moderator

Adrian - that's great! Let us know if you hit any roadblocks.

Remember that you can right click on an cell and change the style (inner/outer margins, borders, etc), if you make one that perfectly meets your needs you can copy the style and paste it onto any other cell/s.

Read more
Posted on the from Esahc ..
John S.
John S.
User

Hello Adrian

I would suggest you use a mysql-table for this.

You could use the database-viewer to show the table.

You can see an example here : http://www.bramminginfo.dk/brm09/side-10.html

You can sort each row and you can filter (search ) in the whole table.

As you can see, you can also have html code to display images. If you go to row 18 ( page 2 ) you will see an image   when hovering the image a gif is shown and when mouseout, the start-image is shown again.

This is the simple version.

You can see another simple version here : http://www.bramminginfo.dk/brm20/tur-optagelser.html

Then there is a more advanced here : http://www.bramminginfo.dk/brm20/database.html

Go to the last record and here you will see a clickable icon - could have been a buy-button.

Here you can also sort columns and filter and make an advanced search. This is made with the genious app Appgini.

It is remarkable easy to create even advanced databases with tables and child-tables with Appgini.

But you probably only need a single table.

I would definitely say you should use a database table for what you show in the attachment.

You could start with the simple database-viewer.

Read more
Posted on the from John S.
John S.
John S.
User

About the height : You can specify a max-height for the icons. This way they will all have the same height when shown - whatever their actual size. You should not make the images actual size much bigger than you want to show them.

If you have tables with many records, it could have influence on the performance if each little icon shown, is from a 3MB image. If you have a image you want to show in the table as 40px height and when hovered in 200px, then the actual size of this image should not be much higher than the 200px. And if you optimize the image for web, then it will have no influence on the performance at all. 

Read more
Posted on the from John S.
John S.
John S.
User

And an advanced table here : http://eksempelsite.dk/side-4.html

This is just a single table. Created with the Appgini tool. The table and all the search and so took only an hour to create.

What took the time here, is the data and the opening of the windows for the Maplink and Virklink.

Here is a test : http://eksempelsite.dk/biler/Biler_view.php

It looks like s... but it is only to test a table with 2 child-tables. The child tables will be shown in a detail view, when a record in the parent-table is clicked.

Read more
Posted on the from John S.