I am trying to make the Card as i call it attached to the screen so when it is resized, the card will go along with it.
Css code:
#wrapper {
position: relative;
max-width: 1920px;
max-width: 100%;
padding-right: 10px;
padding-left: 10px;
}
#introduction-container {
position: relative;
}
#introduction-textposition {
position: absolute;
bottom: 100%;
left: 10%;
}
#introduction-paragraph {
width: 500px;
height: 150px;
background-color: rgba(18, 18, 18, 0.7);
padding: 40px 25px;
margin-top: 0;
}
html code
<div id="wrapper">
<div id="introduction-container">
<div id="introduction-textposition">
<div id="introduction-paragraph">
<h3>RTX 2080Ti Available Now!</h3>
<h1>RAY-TRACE</h1>
<p><span style="color: rgb(118, 185, 0);">NVIDIA RTX</span> is the most advanced platform for ray tracing and AI technologies that are revolutionizing the ways we play and create</p>
<div>
<a href="#" class="introduction-button hover-color">SHOP NOW!</a>
</div>
</div>
</div>
</div>
ps: the introduction-textposition percentaged is me playing around with it, wont work tho.
problem is, when i used the relative position on #introduction-container it the properties wont show here;
html image
What it should look like: illustration
>Solution :
Try this (Open it in "full page" mode)
* {
box-sizing: border-box;
}
body {
margin: 0;
}
#wrapper {
position: relative;
max-width: 1920px;
max-width: 100%;
padding-right: 10px;
padding-left: 10px;
min-height: 100vh;
}
#introduction-paragraph {
width: 400px;
background-color: rgba(18, 18, 18, 0.7);
padding: 40px 25px;
margin-top: 0;
position: absolute;
bottom: 10%;
left: 10%;
}
<div id="wrapper">
<div id="introduction-paragraph">
<h3>RTX 2080Ti Available Now!</h3>
<h1>RAY-TRACE</h1>
<p><span style="color: rgb(118, 185, 0);">NVIDIA RTX</span> is the most advanced platform for ray tracing and AI technologies that are revolutionizing the ways we play and create</p>
<div>
<a href="#" class="introduction-button hover-color">SHOP NOW!</a>
</div>
</div>
</div>