mrbean Posted September 28, 2012 Share Posted September 28, 2012 Hi, I want to have some space between my header element and the slider. I searched on the internet and tried margin-bottom in the header element but it doesn't give me the result I want( I use chrome browser). Here's the code link: http://goo.gl/NNHU8 Quote Link to comment Share on other sites More sharing options...
Mahngiel Posted September 28, 2012 Share Posted September 28, 2012 the margin actually exists. the problem is with your floated elements, as they are removed from the natural flow of the document, thus giving you the impression the margin isn't being applied. the answer to this is a 'clearfix'. You can go the old-school way and do a `<div class="clear"></div>` or you can go "semantic" and add your clears to a psuedo element like ':after'. Quote Link to comment Share on other sites More sharing options...
mrbean Posted September 28, 2012 Author Share Posted September 28, 2012 Check the site again, I added header:after{margin-bottom} But no effect? Quote Link to comment Share on other sites More sharing options...
mrbean Posted September 28, 2012 Author Share Posted September 28, 2012 I did some research on 'clearfix' @ google and I found an solution. Thanks mahngiel for your help! Quote Link to comment Share on other sites More sharing options...
Mahngiel Posted September 28, 2012 Share Posted September 28, 2012 glad to help 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.