evanct Posted June 6, 2009 Share Posted June 6, 2009 So let's say I have a height:auto block element in html. when I add content to it, naturally the height expands. When content is added via CMS I want to then get the height value of the block element and pass it to PHP. is this even possible? If not with PHP alone, could I get the value with javascript and then pass it to PHP? Link to comment https://forums.phpfreaks.com/topic/161225-pass-html-block-height-to-php/ Share on other sites More sharing options...
evanct Posted June 7, 2009 Author Share Posted June 7, 2009 Hmm. the content would just be a list of links, so I figure I can just set the line-height in pixels, multiply the number of links times the line-height, add the margin values, and use that value. only snag there is some of the links could be long enough to spill onto two lines. also, woo i've leveled up to Enthusiast. Link to comment https://forums.phpfreaks.com/topic/161225-pass-html-block-height-to-php/#findComment-850743 Share on other sites More sharing options...
Philip Posted June 7, 2009 Share Posted June 7, 2009 You'll have to use JS to pass the height to PHP. PHP can't actively read from its own DOM since it is server side. Link to comment https://forums.phpfreaks.com/topic/161225-pass-html-block-height-to-php/#findComment-850768 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.