Hey, folks!
I am in the midst of totally redesigning my portfolio webpage via the usage of modern diagonal patterns in web design. In the process of making my divs into diagonal shapes, I’m running into a problem: my topmost div needs to be of a trapezoidal shape, where the bottom of the div should match the angle of the buttons div below it and then be straight on top, sort of like this: https://codepen.io/erikdkennedy/pen/pRVbzx. I do not know how to achieve it! Right now the div shape that I have will not even extend behind the div absolute-positioned behind it. Do you know why that is?
Here is a link to my Codepen here: https://codepen.io/IDCoder/pen/jvqdqv?editors=1100
Here is my CSS code:
/*...........Into stuf.............*/
.about-me-premiere{
position:relative;
border-left: 50px solid #555;
border-top: 0 solid transparent;
border-bottom: 9px solid transparent;
height: 300px;
width: 100%;
box-shadow: 5px 10px #888888;
}
.container {
margin-top: 20px;
margin-bottom: 20px;
height: 100%;
width: auto;
}
.about-me-holder{
position: relative;
border: solid 20px transparent;
border-radius: 40px;
margin-bottom: 10px;
box-shadow: 0 -1px 1px #eee, 0 2px 2px #1d1d1d, inset 0 0 1px #666, inset 0 1px .125em #8b8b8b, inset 0 2px .25em #a4a2a3, inset 0 -1px .125em #8b8b8b, inset 0 -2px .25em #a4a2a3, inset 0 0 0 .375em #cdcdcd;
background: repeating-radial-gradient(rgba(228, 228, 228, 0) 23px, rgba(228, 228, 228, 0.05) 25px, rgba(228, 228, 228, 0) 27px) content-box, repeating-radial-gradient(rgba(166, 166, 166, 0) 13px, rgba(166, 166, 166, 0.05) 15px, rgba(166, 166, 166, 0) 17px) content-box, repeating-radial-gradient(rgba(139, 139, 139, 0) 19px, rgba(139, 139, 139, 0.05) 21px, rgba(139, 139, 139, 0) 23px) content-box, conic-gradient(#cdcdcd, #9d9d9d, #808080, #bcbcbc, #c4c4c4, #e6e6e6, #dddddd, #a1a1a1, #7f7f7f, #8b8b8b, #bfbfbf, #e3e3e3, #d2d2d2, #a6a6a6, #858585, #8d8d8d, #c0c0c0, #e5e5e5, #d6d6d6, #9e9e9e, #828282, #8f8f8f, #bdbdbd, #e3e3e3, #cdcdcd) content-box, radial-gradient(#00d7ff 53%, transparent 65%, transparent 70%, #8b8b8b 70%) padding-box, radial-gradient(#272727 20%, transparent 25%) 0 0 / 1.25em 1.25em padding-box, radial-gradient(#272727 20%, transparent 25%) 0.625em 0.625em / 1.25em 1.25em padding-box, radial-gradient(#444 20%, transparent 28%) 0 0.125em / 1.25em 1.25em padding-box, radial-gradient(#444 20%, #3d3d3d 28%) 0.625em 0.75em / 1.25em 1.25em padding-box, conic-gradient(#b5b5b5, #8d8d8d, #838383, #ababab, #d7d7d7, #e3e3e3, #aeaeae, #8f8f8f, #878787, #acacac, #d7d7d7, #dddddd, #b8b8b8, #8e8e8e, #848484, #a6a6a6, #d8d8d8, #e3e3e3, #8e8e8e, #868686, #a8a8a8, #d5d5d5, #dedede, #b5b5b5) border-box;
}
.About-Me {
background-color: #0099ff;
border-radius: 20px;
box-shadow: inset 0px 5px 20px 0px #000;
width: auto;
position: relative;
}
.glass{
width: 100%;
height: 50%;
/*background-color: rgb(255,255,255,0.2);*/
background: rgba(113,206,239,0.41);
background: -webkit-linear-gradient(top, rgba(113,206,239,0.41) 33%, rgba(33,180,226,0.41) 51%, rgba(183,222,237,0.41) 100%, rgba(183,222,237,0.41) 97%, rgba(183,222,237,1) 100%);
background: -o-linear-gradient(top, rgba(113,206,239,0.41) 33%, rgba(33,180,226,0.41) 51%, rgba(183,222,237,0.41) 100%, rgba(183,222,237,0.41) 97%, rgba(183,222,237,1) 100%);
background: -ms-linear-gradient(top, rgba(113,206,239,0.41) 33%, rgba(33,180,226,0.41) 51%, rgba(183,222,237,0.41) 100%, rgba(183,222,237,0.41) 97%, rgba(183,222,237,1) 100%);
background: linear-gradient(to bottom, rgba(113,206,239,0.41) 33%, rgba(33,180,226,0.41) 51%, rgba(183,222,237,0.41) 100%, rgba(183,222,237,0.41) 97%, rgba(183,222,237,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#71ceef', endColorstr='#b7deed', GradientType=0 );
/* for the following elements, rgba(183,222,237,0.41) 78%, 78% was changed to 100% */
position: absolute;
top: 0;
/*border-radius: 20px;*/
border-top-left-radius: 20px;
border-top-right-radius: 20px;
}
/*........Buttons.....................*/
#buttons{
background-color: skyblue;
margin-top: 0;
-webkit-transform: skewY(-10deg);
-moz-transform: skewY(-10deg);
-ms-transform: skewY(-10deg);
-o-transform: skewY(-10deg);
transform: skewY(-10deg);
}
.myButton {
width: 250px;
height: 40px;
line-height: 1.75em;
-moz-box-shadow:inset 0px 1px 0px 0px #bbdaf7;
-webkit-box-shadow:inset 0px 1px 0px 0px #bbdaf7;
box-shadow:inset 0px 1px 0px 0px #bbdaf7;
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #79bbff), color-stop(1, #378de5));
background:-moz-linear-gradient(top, #79bbff 5%, #378de5 100%);
background:-webkit-linear-gradient(top, #79bbff 5%, #378de5 100%);
background:-o-linear-gradient(top, #79bbff 5%, #378de5 100%);
background:-ms-linear-gradient(top, #79bbff 5%, #378de5 100%);
background:linear-gradient(to bottom, #79bbff 5%, #378de5 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#79bbff', endColorstr='#378de5',GradientType=0);
background-color:#79bbff;
-moz-border-radius:6px;
-webkit-border-radius:6px;
border-radius:6px;
border:1px solid #84bbf3;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:Arial;
font-size:15px;
font-weight:bold;
padding:6px 24px;
text-decoration:none;
text-shadow:0px 1px 0px #528ecc;
box-shadow: 7px 7px 15px black;
transform: skew(25deg);
-o-transform: skew(-25deg);
-moz-transform: skew(-25deg);
-webkit-transform: skew(-25deg);
}
.myButton:hover {
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #378de5), color-stop(1, #79bbff));
background:-moz-linear-gradient(top, #378de5 5%, #79bbff 100%);
background:-webkit-linear-gradient(top, #378de5 5%, #79bbff 100%);
background:-o-linear-gradient(top, #378de5 5%, #79bbff 100%);
background:-ms-linear-gradient(top, #378de5 5%, #79bbff 100%);
background:linear-gradient(to bottom, #378de5 5%, #79bbff 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#378de5', endColorstr='#79bbff',GradientType=0);
background-color:#378de5;
}
.myButton:active {
position:relative;
top:1px;
}
.myButton > span{
display: inline-block;
transform: skew(25deg);
}
.dropbtn {
background-color: #4CAF50;
padding: 16px;
font-size: 16px;
border: none;
cursor: pointer;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
border: 1px dashed black;
}
.dropdown-content a:hover {background-color: #00ffff}
.dropdown:hover .dropdown-content {
display: block;
background-color: #f1f1f1;
}
.dropdown {
position: relative;
display: inline-block;
}
/*.............middle-section.......................*/
.holder {
max-width: 500px;
overflow: hidden;
position: relative;
height: 300px;
margin: auto;
}
div.Portfolio.Pics {
width: 3000px;
position: absolute;
overflow: hidden;
}
figure {
width:500px;
float:none;
overflow:hidden;
}
.Portfolio.Pics figure{
overflow: hidden;
height: 500px;
}
.Portfolio.Pics figure img{
width: 100%
float: left;
opacity: 0.65;
margin-top: 10px;
}
figure{
position: relative;
width: 100%;
margin: 0;
left: 0;
animation: 20s portfolio infinite;
cursor: pointer;
}
@keyframes portfolio {
0%{
left: -100%;
}
25%{
left:-50%;
}
50%{
left:-75%;
}
100%{
right:100%;
}
}
figure:hover {
-webkit-animation-play-state:paused;
animation-play-state:paused;
}
/*.........Connect and other info ..................*/
#middle-section{
background-color: skyblue;
margin-top: 20px;
-webkit-transform: skewY(-10deg);
-moz-transform: skewY(-10deg);
-ms-transform: skewY(-10deg);
-o-transform: skewY(-10deg);
transform: skewY(-10deg);
}
#contact-form {
background-color: #0099ff;
padding: 10px 20px 30px 20px;
width: 400px;
position: relative;
border-radius: 20px;
margin-bottom: 10px;
box-shadow: inset 5px 0 10px -5px #ffffff, inset -5px 0 10px -5px #ffffff, inset 0px -5px 35px -7px #ffffff, 0 0 1px 1px, 0 10px 20px 0 #494547;
font-weight: bold;
color: #E5E6E7;
-webkit-transform: skewY(10deg);
-moz-transform: skewY(10deg);
-ms-transform: skewY(10deg);
-o-transform: skewY(10deg);
transform: skewY(10deg);
}
#contact-form button[type="submit"] {
cursor:pointer;
width:100%;
border: none;
outline: none;
background:#e17f3f;
margin:0 0 5px;
padding:10px;
border-radius:5px;
box-shadow: 1px 3px 2px #444, inset 0px 0px 12px 0px #000;
}
#contact-form button[type="submit"]:hover {
background-color: #79bbff;
color: #e17f3f;
font-size: 1.5em;
}
#contact-form button[type="submit"] {
cursor: pointer;
width: 100%;
border: none;
background: #e17f3f;
margin: 0 0 5px;
padding: 10px;
border-radius: 5px;
}
#contact-form input, #contact-form select, #contact-form textarea {
width: 100%;
background: #fff;
border: 0;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
margin-bottom: 25px;
padding: 5px;
}
h1 {
color: #ffffff;
margin: 10px 0 0 0;
font-size: 36px;
}
#last-section{
background-color: skyblue;
margin-top: 20px;
-webkit-transform: skewY(-10deg);
-moz-transform: skewY(-10deg);
-ms-transform: skewY(-10deg);
-o-transform: skewY(-10deg);
transform: skewY(-10deg);
}
.social-media-icon-footer{
background-color: skyblue;
margin-top: 20px;
-webkit-transform: skewY(-10deg);
-moz-transform: skewY(-10deg);
-ms-transform: skewY(-10deg);
-o-transform: skewY(-10deg);
transform: skewY(-10deg);
}
Here is my HTML code:
<html>
<title>
<head></head>
</title>
<body>
<a href="#top"></a>
<div id="about" class="container" align="center">
<!--<p id="output" style="position:fixed; left:0; top:0; padding:10px; font-weight:bold">
You have scrolled the page by:-->
</p>
<!--Intro-->
<div class="about-me-premiere">
<div class="about-me-holder">
<div class="About-Me">
<div class="row">
<div class="col-md-6">
<img src="https://s31.postimg.cc/akvxxpq57/Gebre_Mesquitta_HTML_Element_3.jpg" class="img-responsive" id="top"/>
</div>
</div>
<div class="row text-center">
<div class="col-md-12">
<p><h2>Front-End Developer with a B.Sc in Industrial Design Technology. <span id="one"> Devoted to the design of experiences with code.</span>
</h2></p>
</div>
</div>
<div class="row">
<div class="col-md-6">
</div>
<div class="col-md-6" col-md-push-6>
<img src="https://s30.postimg.cc/52tghb8xt/Gebre_Mesquitta_HTML_Element_2.jpg" class="img-responsive" id="bottom"/>
</div>
</div>
<div class="glass">
</div>
</div>
</div>
</div> <!--insert end div above here -->
<!--Buttons-->
<div class="row" id="buttons">
<div class ="col-sm-4 text-center" id="first">
<a href="#about" class="myButton"><span>About</span></a>
</div>
<div class="col-sm-4">
<div class="dropdown" id="showcase">
<div class="text-center">
<a href="#portfolio" class="myButton" id="tell-state"><span>Portfolio</span></a>
<div class="red"></div>
<div class="green glow-green"></div>
<!-- <div class="red glow-red"></div>
<div class="green glow-green"></div>-->
</div>
<div class="dropdown-content">
<a href="https://codepen.io/IDCoder/full/Gxqybw/" class="dropdown-tab" title= title="This link opens in a new window" target="_blank">Simon Game</a>
<a href="https://codepen.io/IDCoder/full/mXMqGV/" class="dropdown-tab" title= title="This link opens in a new window" target="_blank">Twitch TV</a>
<a href="https://codepen.io/IDCoder/full/rpdBQJ/" class="dropdown-tab" title= title="This link opens in a new window" target="_blank">Wikepedia</a>
<a href="https://codepen.io/IDCoder/full/NwNOgq/" class="dropdown-tab" title= title="This link opens in a new window" class="dropdown-tab" title= target="_blank">Weather App</a>
<a href="https://codepen.io/IDCoder/full/KZqNdr/" class="dropdown-tab" title= title="This link opens in a new window" target="_blank">Random Quote Machine</a>
<a href="https://codepen.io/IDCoder/full/zEBoOQ/" class="dropdown-tab" title= title="This link opens in a new window" target="_blank">Calculator Web App</a>
<a href="https://codepen.io/IDCoder/full/Xevyqq/" class="dropdown-tab" title= title="This link opens in a new window" target="_blank">Real Estate Website</a>
<a href="https://codepen.io/IDCoder/full/PWYReX/" class="dropdown-tab" title= title="This link opens in a new window" target="_blank">Security Surveillance Website</a>
<a href="https://codepen.io/IDCoder/full/OWbXLw/" class="dropdown-tab" title= title="This link opens in a new window" target="_blank">My Hero Website</a>
</div>
</div>
</div>
<div class ="col-sm-4 text-center">
<a href="#contact-form" class="myButton"><span>Connect</span></a>
</div>
</div>
<!--Portfolio and Other info-->
<div class="col-md-12" id="middle-section">
<!--<div class="col-md-3" id="additional1">
<div class="robot" id="up"><img src="https://s15.postimg.cc/gqahz4pbv/Robot_Finger_2_rotated_down.jpg" width="100" height="213"></div>-->
<div class="paragraph"><p>Every single business belongs on the internet, every last one of them! The internet is a medium by which people in the farthest corners of the world can see you - who you are and what you are about.</p>
</div>
</div>
<div id="portfolio" class="col-md-6 background-image">
<div class="drop-light">
<div class="red-light-two"></div>
<div class="green-light-two"></div>
</div>
<div class="holder">
<div class="Portfolio Pics" id ="showcase">
<figure>
<a href="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" class="each-one" target="_blank"><img src="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg
"width="360" height="270"></a>
<a href=""><a href="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" class="each-one" target="_blank"><img src="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" width="360" height="270"></a>
<a href="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" class="each-one" target="_blank"><img src="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" width="360" height="270"></a>
<a href="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" class="each-one" target="_blank"><img src="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" width="360" height="270"></a>
<a href="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" class="each-one" target="_blank"><img src="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" width="360" height="270"></a>
<a href="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" class="each-one" target="_blank"><img src="https://s25.postimg.cc/uf3qrj8u7/Coming_Soon.jpg" width="360" height="270"></a>
</figure>
</div>
</div>
</div>
<div class="col-md-3" id="additional2">
<p>While having this online presence, it has now become imperative that your website be responsive - able to be viewed on mobile devices. Today more people access the internet via their mobile devices than ever before</p>
<!--<div class="robot" id="up">-->
<!--<img src= "https://s15.postimg.cc/g26pczjzf/Robot_Finger_2_rotated_up.jpg" width="100" height="213"></div>-->
</div>
</div> <!-- end of middle section-->
<!-- Connect Info, video info, skills info-->
<div class="col-md-12" id="last-section">
<div class="col-md-3">
<div class="videos-section"> <!-- one -->
<p id="video"> videos</p> <!-- two -->
</div>
<div class="videos-box"> <!-- three -->
<p>Coming soon!</p>
<p>Coming soon!</p>
<p>Coming soon!</p>
<p>Coming soon!</p>
<p>Coming soon!</p>
<p>Coming soon!</p>
</div>
</div>
<div class=" col-md-6 contact-holder">
<div id="contact-form">
<div>
<h1>Connect</h1>
<h4>Please answer the following questions below.</h4>
</div>
<div>
<form method="post" action="/">
<div>
<label for="name">
<span class="required">Name: *</span>
<input type="text" id="name" name="name" value="" placeholder="Your Name" required="required" tabindex="1"/>
</label>
</div>
<div>
<label for="email">
<span class="required">Email: *</span>
<input type="email" id="email" name="email" value="" placeholder="Your Email" tabindex="2" required="required" />
</label>
</div>
<div>
<label for="subject">
<span>Subject: </span>
<select id="subject" name="subject" tabindex="4">
<option value="hello">Product Service Pricing</option>
<option value="quote">What is your estimated timeline?</option>
<option value="quote">What is your design process? </option>
</select>
</label>
</div>
<div>
<label for="message">
<span class="required">Message: *</span>
<textarea id="message" name="message" placeholder="Please write your message here." tabindex="5" required="required"></textarea>
</label>
</div>
<div>
<button name="submit" type="submit" id="submit" >SEND</button>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-3" id="skills-holder">
<div class="skills-check">
<div class="skills-section"> <!-- one -->
<div class="notification">
<p id ="number">6</p>
</div>
<p id="skills">skills</p> <!-- two -->
</div>
<div class="skills-box"> <!-- three -->
<h1 class="fck">Javascript programming</h1>
<div class="parent">
<div class="item">Application logic</div>
<div class="item">3rd-party API calls</div>
<div class="item">DOM manipulation</div>
</div>
<h1 class="fck">User experience design</h1>
<h1 class="fck">User interface design</h1>
<h1 class="fck">Responsive design</h1>
<h1 class="fck">Advanced CSS</h1>
<div class="parent">
<div class="item">Animation</div>
<div class="item">CSS-Grid Technology</div>
<div class="item">Bootstrap</div>
</div>
<h1 class="fck">Advanced HTML</h1>
</div>
<!--<div class="skills">
<p id="skill">skills</p>
</div>-->
<!--<div class="skills-box">
</div> -->
</div>
</div>
</div><!--end of big holder last section -->
<!--Social media links -->
<div class="col-xs-12">
<div class="social-media-icon-footer">
<div id="contact">
<div class="contact">
<h3>Social Media Connections</h3>
<div>
<ul class="soc">
<li class="socbutton">
<a href="https://www.linkedin.com" target="blank"><i class= "fa fa-linkedin-square fa-fw"></i>LINKEDIN</a>
</li>
<li class="socbutton">
<a href="https://github.com" target="blank"><i class= "fa fa-github fa-fw"></i>GITHUB</a>
</li>
<li class="socbutton">
<a href="https://www.facebook.com" target="blank"><i class= "fa fa-facebook-official fa-fw"></i>FACEBOOK</a>
</li>
<li class="socbutton">
<a href="https://www.freecodecamp.com" target="blank"><i class= "fa fa-fire fa-fw"></i>FREECODECAMP</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>