html - box shadow on figure element getting skewed due to root margin -


i've provided box-shadow on figure element. but, image appearing skewed due *{margin:10px} i've given. there way can still maintain margin , able land box shadow on figure element?

html:

<!doctype html> <html> <head> <meta charset="utf-8"> <title>insert title here</title> <link     rel="stylesheet"     href="drop.css" >  </head> <body>      <section id="pics">         <figure             id="pic1"             class="pictures"         >             <img                 alt="figure1"                 src="http://b-i.forbesimg.com/kellyclay/files/2013/12/glass.jpg"                 title="pic1"             >             <figcaption class="figuredetails">fig1</figcaption>          </figure>           <figure             id="pic2"             class="pictures"         >             <img                 alt="figure2"                 src="http://glass-apps.org/wp-content/uploads/2013/06/google-glass1.jpg"                 title="pic2"             >             <figcaption class="figuredetails">fig2</figcaption>          </figure>     </section>     <section id="content">     <p>hello</p>     </section> </body>   </html> 

css:

@charset "utf-8"; *{     margin: 10px;     /* padding: 10px; */  }   #pics{      width:100%;     padding: 50px 50px; }   .pictures{     float: left;     width:200px;     height:200px;     box-shadow: 10px 10px 5px #888888; }  .pictures:before{     border:5px solid black; } .pictures:after{     border:5px solid black; }   .pictures img{     width:100%;     height:auto;     border: 2px solid;      border-color: #ff0000;    }  /* #pic1{      -ms-transform: rotate(30deg); ie 9     -webkit-transform: rotate(30deg); chrome, safari, opera     transform: rotate(30deg); } */   #pic2{     padding-left: 50px; }  #content{     clear: both; }  .pictures > .figuredetails{     color: red;     padding-left: 20px; } 

the jsfiddle here:

http://jsfiddle.net/5kgh8/

as first comments says want pictures displayed inside shadow box thing need remove

#pic2{ padding-left: 50px; } 

also not find use of

*{    margin: 10px;    /* padding: 10px; */ } 

remove well.

result: jsfiddle


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -