smith.james0 Posted February 1, 2014 Share Posted February 1, 2014 I can not get over flow hidden to work, can anyone point out my error? http://jsfiddle.net/N9c25/ James Quote Link to comment Share on other sites More sharing options...
Solution Strider64 Posted February 1, 2014 Solution Share Posted February 1, 2014 Using position:relative; should do the trick: #scontainer { position: relative; overflow:hidden; height:300px; border-style:solid; border-color:red; } Quote Link to comment Share on other sites More sharing options...
kicken Posted February 1, 2014 Share Posted February 1, 2014 The reason why is because setting an item to position: absolute; removes it from the flow, so your sun is no longer considered to be a child of your container. It gets put into the flow of the nearest positioned element, or the body if no other. By making your container position: relative; it becomes the nearest positioned element and so the sun continues to be a child of it and the overflow works properly. Quote Link to comment Share on other sites More sharing options...
smith.james0 Posted February 2, 2014 Author Share Posted February 2, 2014 Thanks for the reply 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.