I am completely new to the CSS world, and I tried to figure out how to position .main and .comment side by side in the example at the end, with one caveat. I donβt want to compress both in the same # container, I would like this comment to look like βpopβ from the bounding box and align with .main, but outside of #container. The reason I want to do this is because the comment would initially be hidden, and after the user clicks on something, the comment will look pop-open.
So, more specifically, I would like .main to be in a box and .comment in another box ..comment should be to the left of .main, and the vertices of each .comment should match their corresponding .main. Preferably .comment should be visually outside the #container.
If anyone could give me a pointer on what to do, that would be very appreciated! HTML is not installed in stone, so if there is a more convenient presentation, consult!
<html> <head> <style type="text/css"> #container{ margin-left:auto; margin-right:auto; width:700px; background-color:#eee9e9; padding:5px; } </style> </head> <body> <div id="container"> <div> <p class="main">Some content Some contentSome contentSome contentSome contentSome contentSSSSome content Some contentSome contentSome contentSome contentSome content ome content Some contentSome contentSome contentSome contentSome content ome content Some contentSome contentSome contentSome contentSome content ome content Some contentSome contentSome contentSome contentSome content</p> <p class="comment">Comments: some comments</p> </div> <div> <p class="main">Some content Some contentSome contentSome contentSome contentSome contentSSSSome content Some contentSome contentSome contentSome contentSome content ome content Some contentSome contentSome contentSome contentSome content ome content Some contentSome contentSome contentSome contentSome content ome content Some contentSome contentSome contentSome contentSome content</p> <p class="comment">Comments: some comments</p> </div> </div> </body> </html>
source share