I have 4 different colored divs in my HTML and I want to maintain their appearance as they are (Each color represents a div, totaling 4 divs excluding the background color).
Currently, I am facing an issue with my jsFiddle example: HERE
The problem arises when I try to add another item <li>
in my <ul>
, resulting in overlapping CSS styles.
body {
background-image:url('http://subtlepatterns.com/patterns/shattered.png');
margin:0;
}
.chatBody {
position:absolute;
bottom:0;
height:200px;
width:100%;
background-color:#3c454f;
border-top: 10px solid #7ac943;
}
#navlist li {
display:inline;
list-style-type:none;
width:300px;
}
.avatarUser {
height:80px;
width:80px;
background-color:yellow;
float:left;
margin-right:20px;
margin-bottom:20px;
}
li > .frdImage {
position:relative;
/*margin-top:-25px;*/
top:50%;
float:left;
margin-left:5px;
border-radius:6px;
border:solid 2px #aaa;
height:80px;
width:80px;
background-color:yellow;
margin-right:10px;
margin-bottom:20px;
}
li > span.frdName {
position:absolute;
float:left;
margin-top:10px;
font-weight:bold;
font-family:'Verdana', cursive;
font-size:15px;
color:white;
margin-right:200px;
}
.active{
width:300px;
}
.frdStatusIndicator{
float:left;
margin-top:40px;
height:15px;
width:15px;
background-color:#7ac943;
border-radius:10px;
}
.frdStatusName{
float:left;
margin-top:40px;
border-radius:10px;
font-family:'Verdana', cursive;
font-size:15px;
color:white;
line-height:15px;
padding-left:5px;
}
I would greatly appreciate any help on this matter. Thank you for your time!