Closed computermacgyver closed 11 years ago
Updated description: tracked this problem back to introduction of zoomcontainer. Affects all network diagrams
It is 100% width as this is the preferred CSS technique for centring horizontally as I understand it. Obviously we cannot have it preventing nodes from being clicked though. Can you think of a way of centring without this technique?
:-( I wasn't sure the best way myself whichc is why I left it. I've seen some other hacks to get centering. One option would be to dynamically set the left margin in JavaScript where we can know the screen width. I've also seen some solutions using "left:50%;" but by default this places the left edge of the div at 50% of the width (whereas we'd like the center of the div there). I'll have a look about as well. If we both give it some thought it might work. I don't remember exactly what we were doing before?
Not sure this is the best way and I'm offline at the moment so haven't checked this re: standards compliance, but it seems we can do something like: width: 100px; margin-left: -100px; left: 50%; to achieve what we want.
I've juggled this around a bit to try to minimize the area the div's cover. I think the result looks all right, but welcome feedback/changes/reversion.
div#zoomcontainer should be as small as possible. Elements underneath this div are not selectable. In the current layout, zoomcontainer is 100% width and also quite tall due to it including the copyright and zoom buttons. This creates a large area in which nodes are viewable but not selectable. I think this should be reworked to remove the copyright from the div, and make the div as small in width and height as possible.