html - border-radius wont apply to top of div -
i'm working on landing page personal use, have ran problem. have div border radius, called .popout. border radius applies bottom of div not header part, why? , how can fix this? if know how make box-shadow little bit lighter , not dark great! thanks!
code:
html:
*{margin:0; padding:0;} body{ background: #ccc; color:#000305; font-size: 87.5%; font-family: arial, 'lucida sans unicode'; line-height: 1.5; text-align: left; } .body{ margin: 0 auto; width: 70%; background:#ebebeb; margin:auto; } .mainback{ margin:auto; background:white; width:600px; height:650px; } .popout{ background:white; width:80%; height:600px; margin:auto; box-shadow:0px 0px 15px 0px; border-radius:6px; position:relative; top:30px; } .mainheader{ background:linear-gradient(#465bf6,#3149f2); width:100%; height:100px; } <html> <head> <meta charset="utf-8"> <title> welcome! </title> <script type="text/javascript" src="jquery.js"> </script> <script type="text/javascript" src="script.js"> </script> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body class="body"> <div class="mainback"> <div class="popout"> <div class="mainheader"></div> <div class="mainarea"></div> <div class="mainareab"></div> <div class="mainfooter"></div> </div> </div> </body> </html>
your .mainheader div covering border-radius of .popout div. add line .mainheader class: border-radius: 6px 6px 0px 0px;
also, make box-shadow lighter add color this:
box-shadow:#777 0px 0px 15px 0px;
here's example:
*{margin:0; padding:0;} body{ background: #ccc; color:#000305; font-size: 87.5%; font-family: arial, 'lucida sans unicode'; line-height: 1.5; text-align: left; } .body{ margin: 0 auto; width: 70%; background:#ebebeb; margin:auto; } .mainback{ margin:auto; background:white; width:600px; height:650px; } .popout{ background:white; width:80%; height:600px; margin:auto; box-shadow:#777 0px 0px 15px 0px; border-radius:6px; position:relative; top:30px; } .mainheader{ background:linear-gradient(#465bf6,#3149f2); width:100%; height:100px; border-radius: 6px 6px 0px 0px; } <html> <head> <meta charset="utf-8"> <title> welcome! </title> <script type="text/javascript" src="jquery.js"> </script> <script type="text/javascript" src="script.js"> </script> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body class="body"> <div class="mainback"> <div class="popout"> <div class="mainheader"></div> <div class="mainarea"></div> <div class="mainareab"></div> <div class="mainfooter"></div> </div> </div> </body> </html>
Comments
Post a Comment