Jump to content
raynor009

clear: both; nu merge in FireFox

Recommended Posts

HTML:

<!DOCTYPE html>

<!--

*Div pagina: latime=465 inaltime=455
-->

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
<title>The Wasteland 2014</title>
</head>

<body>
<div id="wrapper" align="center">
<div id="wrapper_inner">
<div id="headerContainer"></div>
<div id="bodyContainer">
<div id="leftColumn"></div>
<div id="rightColumn"></div>
<div class="clear"></div>
</div>
<div id="footerContainer"></div>
</div>
</div>
</body>

</html>



CSS

 body{
margin: 0px;
padding: 0px;
}

clear{
display: block;
}

#wrapper{
width: 100%;
}

#wrapper_inner{
width:800px;
height:200px;
}

#headerContainer{
idth:800px;
height:200px;
background-color: red;
}

#bodyContainer{
width:800px;
height:200px;
background-color: grey;
}

#leftColumn{
width: 395px;
height: 400px;
float: left;
background-color: green;
}

#rightColumn{
width: 395px;
height: 400px;
float: right;
background-color: orange;
}

#footerContainer{
width:800px;
height:200px;
background-color: black;
}



/*width: 465px;
height: 455px;*/

Cum as putea sa repar problema?

Practic footerContainer este suprapus de leftColumn si rightColumn cand trebuia sa fie sub ele si nu stiu ce sa fac :/

Edited by raynor009
Link to comment
Share on other sites

/**
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
* contenteditable attribute is included anywhere else in the document.
* Otherwise it causes space to appear at the top and bottom of elements
* that are clearfixed.
* 2. The use of `table` rather than `block` is only necessary if using
* `:before` to contain the top-margins of child elements.
*/
.cf:before,
.cf:after {
content: " "; /* 1 */
display: table; /* 2 */
}

.cf:after {
clear: both;
}

/**
* For IE 6/7 only
* Include this rule to trigger hasLayout and contain floats.
*/
.cf {
*zoom: 1;
}

Si adauga ca semn de carte: A new micro clearfix hack – Nicolas Gallagher

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...