My frustration levels are off the charts as I struggle to understand why this code refuses to cooperate. As I work on setting up my personal website, I want everything to be perfectly responsive before I even think about adding my content. One major headache - I am aiming for a 3x3 grid of boxes to showcase my work (with div id = container), but each time I introduce the ninth div block (p9), chaos reigns and the layout falls apart with no apparent cause. Here's the snippet for the desktop layout:
body{
background-color:#FFB51E;
width:100%;
height:1000px;
position:absolute;
}
/* unvisited link */
a:link {
text-decoration:none;
background-color: #2A56C4;
color:#fff;
padding:15px;
border-radius:26px;
}
/* visited link */
a:visited {
color: fff;
}
/* mouse over link */
a:hover {
background-color:#FF581E;
}
/* selected link */
a:active {
color:#FF581E;
background-color:fff;
}
#header{
width:80%;
height:160px;
margin: 0 auto;
position:relative;
display:block;
}
.left{
color:#fff;
text-align: left;
margin-top:25px;
margin-bottom:15px;
font-size:36px;
position:relative;
float:left;
width:310px;
display:block;
}
.right{
text-align:right;
width:300px;
float:right;
padding-top:5px;
margin-bottom:15px;
font-size:24px;
position:relative;
float:right;
z-index:2;
}
.works{
text-align:center;
position:relative;
float:left;
left:30%;
font-size:25px;
width:100px;
display:inline-block;
}
.about{
text-align:center;
position:relative;
float:right;
right:30%;
font-size:25px;
width:100px;
display:inline-block;
}
.border{
background-color:none;
width:100%;
height:85px;
margin:0 auto;
border:none;
border-bottom: 6px solid #000;
float:none;
position:relative;
}
/*body stuff*/
#container{
position:static;
display:block;
margin:0 auto;
font-size:0px;
margin-top: -10px;
width:80%;
height:550px;
}
.p1{
background-color: aliceblue;
color:000;
font-size:12px;
width:230px;
z-index: 1;
float:left;
margin: 0px;
padding:0px;
}
... /*Styles for p2 to p8 remain unchanged*/
.p9{
background-color: green; /*Changed from previous duplicate entry*/
width:230px;
z-index: 1;
float:left;
margin-top: 20px;
padding:0px;
}
The urge to fling my laptop out the window grows stronger by the minute. Any advice or assistance you could provide would be immensely valued! Feel free to ask if you require the html code as well.