I've encountered a small issue with my code and need some guidance. Is it possible to float elements to the left and right inside an absolute div
?
Do I need to make each element within this div
absolute as well, positioning it relative to another element?
Alternatively, is there a way to achieve this using floating or any other methods?
Here is the CSS code snippet:
#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 file currently looks like this:
The desired final result should look something like this:
I'm uncertain if achieving this layout without using the (position) property is possible, but I tend to rely on it as it fixes most of my issues.
Thank you for taking the time to read my query! Your help is greatly appreciated :)