Simple CSS/HTML question

Status
Not open for further replies.

grand

Sex? Yes please.
May 4, 2014
249
79
How do I move the button in the top left corner into the rectangle i selected?
Here is the code and screenie:
You must be registered for see images attach

HTML:
<html>

<head>
<meta charset=utf-8>
<style>
body {
    background-color: #202020;
}
h1 {
    font-family: "Verdana";
    left: 0;
    line-height: 200px;
    margin: auto;
    margin-top: -100px;
    position: absolute;
    top: 50%;
    width: 100%;
    font-size: 200%;
    text-align: center;
}
.button{
    font-family: "Emotion Engine":
    background-color: #800000;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 100px;
}
</style>
</head>

<body>
<h1> <font color = #800000>Welcome to Aux Gaming.</font></h1>
<a href="home.php" class="button">Let's go.</a>
</body>

</html>
 

TesoMayn

Boredom, it vexes me.
Oct 30, 2011
1,482
1,482
Cba to read, going to assume

Code:
position: relative;
-webkit-transform: translateY(-50%);
-o-transform: translateY(-50%);
transform: translateY(-50%);
 

RastaLulz

fight teh power
Staff member
May 3, 2010
3,934
3,933
You can use flexbox to achieve this, by using the " " property.

 
Last edited:
Status
Not open for further replies.

Users who are viewing this thread

Top