How would I add a button to the top right of block level elements? Lets say i have :
<div>some content here</div>
and lets say this content is long enough to make a “block”, how would I format to have a button at the TOP RIGHT of the block, right next to the block that is?
(1) One way is to float the
buttonright at the top of the container.(2) Another way is to position the
buttonabsolutely inside thedivcontainer and give thedivcontainer position (so that elements postioned absolutely inside it are relative to this container). This way the button can be anywhere in the markup, providing it is inside the container.However, the button will now be on top of other content inside the container so you might have to adjust this with padding etc.