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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.