I'm just starting out with HTML, CSS, and bootstrap and I'm attempting to create a page that looks like this.
..............................................................................................................................................................
Header
..............................................................................................................................................................
Following the header, I want a rectangular section on my page with some text and a button.
The specifications for this rectangle are as follows:
Here is the code I have so far:
.rectangle {
width: 632px;
height: 269px;
border-radius: 4px;
border: solid 1px #e0e0e0;
background-color: #ffffff;
text-align: center;
}
.Find-your-number {
width: 468px;
height: 23px;
font-size: 18px;
font-weight: normal;
font-style: normal;
font-stretch: normal;
line-height: 1.28;
letter-spacing: -0.03px;
text-align: center;
color: #333333;
}
.btn-bg {
width: 303px;
height: 48px;
border-radius: 4px;
background-color: #f9c940;
}
.open {
width: 291px;
height: 54px;
font-size: 49px;
font-weight: normal;
font-style: normal;
font-stretch: normal;
line-height: 1.1;
letter-spacing: -0.8px;
text-align: center;
color: #333333;
padding-top: 5%;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row">
<div class="col-md-12 pt-md-5 text-center">
<div class="rectangle">
<p class="open">Open here</p>
<p class="find-your-number">Find your number</p>
<button class="btn-bg">Start</button>
</div>
</div>
</div>
</div>
This rectangle should be positioned 250px
from the top and 196px
from the side. How can I achieve this?
Currently, the rectangle appears slightly off to the left of the page.
Additionally, the text inside the rectangle doesn't seem to adhere to the specified font size and alignment in the CSS. How can I fix this?