How do i set the table under the images to be the same width as the image above? Thanks for your help!
http://cran-web.com/letaky/generate/10
EDIT: I was talking about "tab_cena", not "tab_objednavky". Sorry for misunderstanding.
How do i set the table under the images to be the same width as the image above? Thanks for your help!
http://cran-web.com/letaky/generate/10
EDIT: I was talking about "tab_cena", not "tab_objednavky". Sorry for misunderstanding.
Not sure I am fully understanding, but #tab_objednavky
style you have width: 160%
. Just set that to width: 100%
and it will fill the .cell
container.
Set the width of your table (#tab_objednavky) to 100%.
Currently your style shows that you have the width of your table set to 160%.
Looking at your layout it looks like the width of the image containers is set by the class .cell_1
, so just add it to your table and you should set. (Actually you should replace the existing cell
class that is already applied to it.)
(Nazdar!)
There are only 2 kinds of measurements you can give the table: a fixed width like 1000px
, or a percentage like 100%
. If you give a fixed width, then you have to know the width of the items above (4 cells, 249px each). If you give a percentage, then it depends on the size of the element that contains your table.
You can use a percentage to your advantage. Since your table is in a 249px cell and you want it to stretch across 4 cells, try setting the width to 400%
. It's a little bit of a hack because you're breaking out of the cell container, but it should work.
A better way would be to make the .cell
equal 249px x 4 (996px
), and just make the #tab_objednavky
table inside it 100%
width.
Edit: to answer your question based on the title of your post: you can't do that without using JavaScript to set the size of the container div.