Anarchatos Posted March 9, 2008 Share Posted March 9, 2008 Hi, I'm not entirely sure whether this should be in the CSS forum or the Javascript forum, anyway: I've got a fairly simple script to expand or collapse a div. It works perfectly in IE but it messes up the height of my entire page in FF (upon collapsing the div, the page keeps its old height, so then I get a huge white space below my page). Here's part of my code: CSS: .expand { padding: 0px 0px 0px; overflow: hidden; } .collapse { display: none; overflow: hidden; } Javascript: function swap(expand) { x = document.getElementById(expand); if (x.className == "expand") { x.className = "expand collapse"; } else { x.className = "expand"; } } Body: onClick="swap('Liveset_{$liveset_id}');" Here's the page I'm talking about: http://ismusic.sc11.co.uk/livesets.php Scroll down a bit and skip the first 3 entries, only the last 7 per page are supposed to be able to expand/collapse. But like I said: in FireFox, after collapsing again, it just keeps the old height and screws up the entire page. Link to comment https://forums.phpfreaks.com/topic/95250-expandingcollapsing-a-div-in-ff/ Share on other sites More sharing options...
The Little Guy Posted March 10, 2008 Share Posted March 10, 2008 I didn't see that problem. Link to comment https://forums.phpfreaks.com/topic/95250-expandingcollapsing-a-div-in-ff/#findComment-488266 Share on other sites More sharing options...
haku Posted March 10, 2008 Share Posted March 10, 2008 I didn't see that either. Are you using an old version of firefox? If not, maybe its a firefox plug-in causing the problem. Link to comment https://forums.phpfreaks.com/topic/95250-expandingcollapsing-a-div-in-ff/#findComment-488317 Share on other sites More sharing options...
Anarchatos Posted March 10, 2008 Author Share Posted March 10, 2008 I "fixed" the problem with a workaround, doesn't work quite the way I want, but it works. It was too late and I was too tired to post here though, so I guess this is "solved" for as far as that goes. Link to comment https://forums.phpfreaks.com/topic/95250-expandingcollapsing-a-div-in-ff/#findComment-488402 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.