So I'm having a little issue with my code and wanted to ask if I can float left and right elements inside an absolute div
.
Should I make each element of this div
absolute as well and position it to the relative element?
Or is there a way to get around this using floating or other methods?
CSS code:
#story{
position: absolute;
margin-top:180px;
margin-left:10px;
width: 450px;
}
#story .img-left{
float:left;
}
#story p{
float:left;
}
#sidebar{
position: absolute;
margin-top:180px;
margin-left:550px;
background-color: white;
border-style: solid;
border-color:brown;
border-width: 5px;
}
\
My index looks like that:
It should look like this:(final result):
I'm not sure if this can be done without using the (position) thing but I can't really avoid it since I find it fix most of my problems
Thank you for reading my question! and thanks in advance :)