I have a div with an absolute position and I want to put another div under.Two divs have different widths.The top div is in absolute position and centered. The diva, which should be below, is 100% wide.How to do it? Thank!
div
float:right
Example:
div#p8015buttons { position:absolute; bottom:0.5em; right:0.5em; width:90px; } div.p8015 { float:right; margin:1px; }
Wrap both divs in the third and place this absolute instead of the original.
, .
HTML:
<div class="wrapper"> <div class="one"> Content </div> <div class="two"> More content </div> </div>
CSS:
.wrapper { position:absolute; width: 500px; height: 400px;/*whatever you want*/ } .one, .two { position:relative; /*or static*/ }
, :)
HTML MARKUP
<div class="wrapper"> <div class="left-ontent> </div> <div class="right-ontent> </div> </div>
CSS
.wrapper{width:980px;margin:0 auto;position:absolute;} .left-content{float:left;width:630px;} .right-content{float:right;width:320px;}
, css
<div style="width:500px; margin: auto; height:200px; background-color:black;"> </div> <div style="width:100%; height:200px; background-color:green;"> </div>
Source: https://habr.com/ru/post/1744313/More articles:subversion 1.6.x теряют изменения при регистрации - svnHow to vertically align text using a button with a highlighted background? - androidpage separator in kate editor - pythonHow do I know if my application is available on the Android market with all versions? - androidAndroid Cursor weird behavior - androidasp.net mvc download ajax post file - jqueryIs it a good idea to start a thread from your own constructor? - javaAndroid WebView zoom controls do not move after resizing - androidZoom in / out in a web browser - androidColdFusion - regex callback for function calls - coldfusionAll Articles