Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Apr 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Table height/width

    Is there anyway to find the height and width of a table using php

    Scenario: Running a forum and users are able to have there own sig but there is a size limit to their sig, eg 150pixels and id like to make it easier for my staff and have it so when users input their sigs and the table is over 150pixels it'd die

  • #2
    Senior Coder
    Join Date
    Jan 2007
    Posts
    1,648
    Thanks
    1
    Thanked 58 Times in 54 Posts
    There isn't.

    You can get the size of the image used though. And limit it through that. Though if they can have both images and text, then that won't work.

    http://us.php.net/gd

    One easy "fix" could be that you put the signature in a div, then apply automatic overflow so that when it gets too big, it turns into a scrollable area. This way it would never reach past 150. Not sure if setting maximum size works great in all popular browsers though.

  • #3
    Regular Coder
    Join Date
    Oct 2005
    Location
    Right Here
    Posts
    654
    Thanks
    1
    Thanked 0 Times in 0 Posts
    You could count image height and line rows? But why make it die? I would set this up at insert. Take a little more time to develop that instead of just cutting them off at the end.

  • #4
    New Coder
    Join Date
    Apr 2007
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    im already counting the image pixels etc, i had a look in google for how to count line rows but i could only find it from reading files etc, could you narrow it down a little of me plz

  • #5
    Senior Coder
    Join Date
    Jan 2007
    Posts
    1,648
    Thanks
    1
    Thanked 58 Times in 54 Posts
    There are just too many variables to be able to do this.

    This is what forum moderators are for.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •