Showing posts with label css. Show all posts
Showing posts with label css. Show all posts

Apr 8, 2014

CSS: floated elements with parent collapse and side menu

Having a floating side menu in CSS will cause problems with clearing floating elements in the content. For example, using .clearfix or clear:both will cause the clear to jump under the side menu.

The solution to this is somewhat counter-intuitive, but try using the property overflow:hidden; on the parent of the floating elements.


Now is the time for all good men to come to the aid of their country.
This is non-float content.





Now is the time for all good men to come to the aid of their country.
This parent has {overflow: hidden;}.

Nov 21, 2010

Flash wmode (transparent/opaque/window) z-index

In flash player 9 and below there was a problem with the object's z-index if the wmode was set to window.

When this option is set to transparent, it fixes the z-index issue, but messes up the keyboard layout and mouse wheel events in flash object. Flash player 10.1 fixes the keyboard layout issue.

Workaround
Setting wmode to opaque keeps the mouse wheel functionality and z-index of absolute elements on the page, but only if you set the background color for the element!

Having a transparent background (or setting the opacity attribute in CSS) (still) does not solve the issue.