Dave's Brain

Browse - Programming Tips - How can I put a box in the corner?

Date: 2015jun15
Language: css/html

Q.  How can I put a box in the corner?

A.  Use position: absolute like this:

<!doctype html> <style type="text/css"> .corner-box { position: absolute; top: 10%; right: 10%; background-color: yellow; padding: 2em; } </style> <span class="corner-box"> Hi, I am in the corner </span>

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.