View Single Post
Old 10-20-2012, 05:27 PM   PM User | #10
Redcoder
Regular Coder

 
Redcoder's Avatar
 
Join Date: May 2012
Location: /dev/couch
Posts: 309
Thanks: 2
Thanked 46 Times in 45 Posts
Redcoder has a little shameless behaviour in the past
I don't do a lot of front-end stuff, but for this, you need a scripting language as the width's will vary depending on the tables' width. HTML alone cannot do this for you.

You need Javascript/JQuery or PHP for this. Personally, i'd use PHP to determine the needed width values as i'm primarily a PHP guy, but for you, you should try JQuery.

For example, for JQuery, try something of this sort:

PHP Code:
<script>
$(
document).ready(function(){
var 
thewidth = $('#MyTable').width();

//Then add width to header and footer
$('#myheader').width(thewidth);
$(
'#myfooter').width(thewidth);

}

//Then you can apply this width to the header and footer
<script
Try something along those lines. JQuery really makes work easier . Less code, more logic packed in.
__________________
For professional Hosting and Web design.....


NetEssentials.co.uk
Redcoder is offline   Reply With Quote
Users who have thanked Redcoder for this post:
nani_nisha06 (10-24-2012)