Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
CSS
.main-con{
    width:960px;
    background-color:ffffff;
    margin-left:auto;
    margin-right:auto;
    }

.box {
  position: relative;
  width: 800px;
  height: 300px;
  background-color: #fff;
  margin-right:auto;
  margin-left:auto;
  border-bottom:1px #CCCCCC solid;

}
.box:before {
    position: absolute;
    width: 800px;
    border-bottom:1px #CCCCCC solid;
    border-radius: 10px / 100px;
    z-index: -1;
    top: 10%;
    bottom: 10%;
    content: "";
    box-shadow: 0 0 15px rgba(0,0,0,0.6);
    }




C#
.top-stripe{
    height:80px;
    margin-top:60px;
    background: rgb(160,29,99); /* Old browsers */
background: -moz-linear-gradient(left, rgba(160,29,99,1) 0%, rgba(217,0,115,1) 30%, rgba(217,0,115,1) 70%, rgba(160,29,99,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(160,29,99,1)), color-stop(30%,rgba(217,0,115,1)), color-stop(70%,rgba(217,0,115,1)), color-stop(100%,rgba(160,29,99,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, rgba(160,29,99,1) 0%,rgba(217,0,115,1) 30%,rgba(217,0,115,1) 70%,rgba(160,29,99,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, rgba(160,29,99,1) 0%,rgba(217,0,115,1) 30%,rgba(217,0,115,1) 70%,rgba(160,29,99,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(left, rgba(160,29,99,1) 0%,rgba(217,0,115,1) 30%,rgba(217,0,115,1) 70%,rgba(160,29,99,1) 100%); /* IE10+ */
background: linear-gradient(to right, rgba(160,29,99,1) 0%,rgba(217,0,115,1) 30%,rgba(217,0,115,1) 70%,rgba(160,29,99,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a01d63', endColorstr='#a01d63',GradientType=1 ); /* IE6-9 */


    }




XML
<div class="box">
        <div class="top-stripe"></div>
    </div>
Posted
Comments
vbmike 25-Nov-13 13:04pm    
Without knowing what you are trying to achieve it is a little hard to help troubleshoot the issue. Using your code provided I see a bordered div witht a purple stripe up top. I don't see a side div nor do I see a difference when I remove the top margin except of course the div moves up...you need to explain more for everyone to understand.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900