coco243 Posted May 6, 2013 Share Posted May 6, 2013 (edited) I am trying to arrange a web site with divs. I had decided to make a div named "big", and that div to be the page container div, the container for all other divs. But I have problems. The "big" div doesn't respect the margins setted by me. In special, the div is to long, it is not respecting the bottom margine. I will place the code here: The CSS file *{margin: 0px;padding: 0px;} html,body {height: 100%;background-color:rgb(238,233,233);} .big { /* div wich contains top, content and down divs */margin: 10% 20% 20% 20%;min-height:70%;height:auto;background-color:rgb(185,194,177);}.top {min-height:10%;background-color:red;}.down {position:relative;bottom:0%;min-height:5%;background-color:red;}.content {min-height:60%;height:auto;background-color:green;} And the php file: <html><head> <link rel="stylesheet" type="text/css" href="clothes.css"/> <body> <div class="big"> <div class="top"><p> MENU </p></div><div class="content"><p> CLOTHES [32] But I must explain to you how all this mistaken idea of denouncing of a pleasure and praising pain wasborn and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the[32] cpleasures, or else he endures pains to avoid worse pains.</p></div> <div class="down"><p> cucu </p></div> </div></body></html> And the URL: http://clothes.net84.net/clothes.php Please if you can help me with my issue. Thank you. Edited May 6, 2013 by damy Link to comment Share on other sites More sharing options...
newseed Posted May 6, 2013 Share Posted May 6, 2013 I see the margins working just fine for the 'big' div. Maybe you want some padding for each of the colored boxes so that the text are not on the very edges? Link to comment Share on other sites More sharing options...
coco243 Posted May 6, 2013 Author Share Posted May 6, 2013 As I said and at the subject of this topic, my problem is that my " big" div doesn't respect the bottom margin who is set at value of 20%. I want space under this principal div, space that it is not respected. I need advice on this problem.Thank you. Link to comment Share on other sites More sharing options...
newseed Posted May 6, 2013 Share Posted May 6, 2013 As I said before that the margins are working fine. You can apply overflow: hidden to the 'big' div to see if that resolves your issue. Also, be sure to add a Doctype to your page. Link to comment Share on other sites More sharing options...
coco243 Posted May 7, 2013 Author Share Posted May 7, 2013 I tested this page on 3 computers, and the result is the same, my "big" div is extentded to the bottom of the web browser page, it doesn't respect my 20% bottom margin of that div. It is a technical problem, but I don't know how to resolve this problem. I want that my "big" div, that I use it as a container for my page content to be separated from the bottom of the page. I want to place this div how I want, at precise coorodonates, to be fixed how I want to be. How I can achieve that? Thanks. Link to comment Share on other sites More sharing options...
newseed Posted May 7, 2013 Share Posted May 7, 2013 (edited) As I said before, it's showing the spacing below. Are you looking at this in your browser? If so, which one? Edited May 7, 2013 by newseed Link to comment Share on other sites More sharing options...
coco243 Posted May 7, 2013 Author Share Posted May 7, 2013 In google chrome and internet explorer 8, the bottom space isn't dysplayed. But on mozilla it apears. Why it's happening this? How I fix that? Link to comment Share on other sites More sharing options...
newseed Posted May 7, 2013 Share Posted May 7, 2013 Add this right after the closing 'bib' div.<div style="clear:both;"></div> Link to comment Share on other sites More sharing options...
coco243 Posted May 8, 2013 Author Share Posted May 8, 2013 (edited) I made your modification, nothing happening.But I want a clean solution, not an artifice. I want that my defined properties of "big" div to be respected.Thank you. Edited May 8, 2013 by damy Link to comment Share on other sites More sharing options...
newseed Posted May 8, 2013 Share Posted May 8, 2013 Then why not apply the margins or paddings to body instead? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now