Here is a link to the code: http://jsfiddle.net/vicky081/jmGwX/5/. I am trying to change the width of the div, which is currently set at 100%. When I change it to 50%, the div appears on the left side. Is there a way to make the div appear in the center when its size is reduced?
I understand that when the div's width is set to 100%, it extends from the left to the right. If I change it to 50%, it extends from the left to 50% on the right. Can it be modified to show from the center? For example, if the width is reduced to 50%, it should display 25% from the center towards both the left and right.
Below is the CSS code:
.notify {
background: #FFFFFF;
width:50%;
position: relative;
margin:-13px 0px 0px -5px;
padding: 2px 0px 0px 0px;
border-bottom:2px solid #CC0000;
box-shadow: 0px 4px 5px #AAAAAA;
font-size:14px;
font-family: 'Lato Regular', Arial;
text-transform:uppercase;
text-align:center;
}