vozzek Posted January 3, 2009 Share Posted January 3, 2009 Happy weekend all, I was wondering the best way to do the following: <div class="wrapper"> <div class="left"> <div class="right"> </div> <div> <div> "wrapper" has a fixed width of 790px. The width of "left" will be dynamic... anywhere from 200 all the way up to 580px. I need the width of class "right" to be 790 - (minus) the width of "left". For example if "left" was 580px, I would need to set "right"'s width to 210px. Is there a way to figure this in PhP? Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/139341-using-php-to-determine-widths/ Share on other sites More sharing options...
revraz Posted January 3, 2009 Share Posted January 3, 2009 $left = 580; $right = (790-$left); Link to comment https://forums.phpfreaks.com/topic/139341-using-php-to-determine-widths/#findComment-728800 Share on other sites More sharing options...
vozzek Posted January 3, 2009 Author Share Posted January 3, 2009 I guess I should've mentioned, I need to determine the width of an <img> that'll be assigned to the "right" class. The image is what could be any size width. Link to comment https://forums.phpfreaks.com/topic/139341-using-php-to-determine-widths/#findComment-728841 Share on other sites More sharing options...
revraz Posted January 3, 2009 Share Posted January 3, 2009 $right would be that width. Link to comment https://forums.phpfreaks.com/topic/139341-using-php-to-determine-widths/#findComment-728843 Share on other sites More sharing options...
DarkSuperHero Posted January 3, 2009 Share Posted January 3, 2009 how about making a php page with all your css and having your script inthere.... when the php script prints all the css...in nice plain readable nothing more than css... :-) Link to comment https://forums.phpfreaks.com/topic/139341-using-php-to-determine-widths/#findComment-728910 Share on other sites More sharing options...
vozzek Posted January 3, 2009 Author Share Posted January 3, 2009 Awesome guys thanks, I ended up using the getimagesize() function. Much appreciated! Link to comment https://forums.phpfreaks.com/topic/139341-using-php-to-determine-widths/#findComment-728914 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.