I have css question about position. After sdie by side div, I want a new line on left side .The output like the below. Would someone tell me how to achieve it. Thanks in advance.
the ideal output on the page:
------------------------------------------------------------------------_------------
| left Right |
| New line New line New line New line New line New line |
-------------------------------------------------------------------------------------
Current output:
-------------------------------------------------------------------------------------
| left Right|
| New line New line New line New line New line New line|
-------------------------------------------------------------------------------------
There is my code
<html>
<head>
<style>
h2.pos_left {
position: relative;
left: -20px;
}
h2.pos_right {
position: relative;
left: 20px;
}
.Right{
float: right;
text-align:right;
}
.Left{
float: left;
}
.clear{
clear: both;
}
.newline{
float: left;
text-align:left;
}
</style>
</head>
<body>
<div class="Left">left</div>
<div class="Right">Right</div>
<div class="clear"></div>
<div class="newline">New line New line New line New line New line New line </div>
</body>
</html>
Becuzz :
Your CSS is right. Your HTML is not. You never close your Right div so the browser thinks your newline div is inside that div. Change\n\n<div class=\"Right\">Right<div>\n\n\nto\n\n<div class=\"Right\">Right</div>\n",
2014-07-17T15:53:24