October 28, 201313 yr Sup guys, i've stuck and dont know what to do, maybe someone will help me with this one. <table width="860"> <tr> <td>8.10 - 9.00</td> <td>text text text text text text text text</td> <td> <img src="img/_temp/50x50.jpg"/> <img src="img/_temp/50x50.jpg"/> <img src="img/_temp/50x50.jpg"/> <img src="img/_temp/50x50.jpg"/> </td> </tr> </table> Alright, in first td we have a hours when meeting starts and this td have width of 160px. Second td have some text and width of it depends on width of third td. Third td have thumbnails in it, thumbs must be inline and auto width. (each thumbnail 50x50). Sometimes will be one, sometimes will be 5 or 10 or 3.... Can someone tell me how to get this working with all td's in row not clearing ech other ? Any help will be good - im dont have any ideas left how to get this working. Edited October 28, 201313 yr by n0xx
October 29, 201313 yr Author Ok, maybe someone will help me other way. <wrapper> <1st element> <2nd element> <3rd element> </wrapper> wrapper = 860px 1st element = 135px I would like to have jquery script that calculate for me width of 3rd element and after calculate what width is it set width of 2nd element:check what 3rd element have width wrapper - 1st width - 3rd width = 2nd element width set 2nd element width. Is it even possible if there would be 20 wrappers like this and every with different 3rd element width ?
October 30, 201313 yr Maybe this video tutorial will be helpful. I'm showing how to get the height of an element and assign it to other elements. You can easily adapt the script to capture and set widths instead of heights just target the offsetWidth property instead os offsetHeight. Link to the video: http://www.youtube.com/watch?v=_uqhQf7X5o4Link to the code from the tutorial: http://www.nielsharbo.dk/tutorials-eng.php Edited October 30, 201313 yr by Nillervision
October 31, 201313 yr Have a look at this example http://www.wickham43.com/forumposts/n0xx131031.html . The top table has a width of 250px for the right column but the middle table the right column has no width (ie auto width, normally to match the widest requirement). In this case the middle table right column has only eleven icons as the table sofware seems to have decided that eleven is all it wants to show, even though it could have reduced the middle column a little more! So much for the browser's programming. IE and Firefox both do this, because the auto widths are apportioned if no width is stated according to the rules for tables. Same in the bottom right column. In the top table the right column icons just stack if there are too many for the fixed 250px width and the left and middle columns apportion the remaining width. In the middle table the left column auto width gets squashed unless you give it a fixed width of 160px because the right column has too many icons. In the lowest example the left column has a fixed width of 160px. If you use the javascript method, remember that not everyone has javascript enabled. Edited October 31, 201313 yr by Wickham
Create an account or sign in to comment