How do you float a div to the top right hand corner of a page using css? I want to float the topcorner
div which is below:
<p><a href="login.php">Log in</a></p>
<div class="topcorner"><a href="home.php">Back to Home</a></div>
log in goes in left hand corner which it does at moment, I want home link to be placed in other corner,
the style is:
hope it will work. Thanks
You can use css
float
Have a look at this CSS Positioning
You ca also use this in CSS external file.
Try css:
you can play with the
top
andright
properties.If you want to float the
div
even when you scroll down, just changeposition:absolute;
toposition:fixed;
.Hope it helps.