CSS Styling not working in external file using backgound-image -
i'm using media queries passing image html page external css file styling works if call image directly html file not external css file.
html code: <img id="photo" class="photo-frame"> external css code: #photo { background: url('/images/example-photo.jpg') no-repeat; width: 200px; height: 200px; } .photo-frame { float: left; padding: 10px 10px 30px 10px; background-color: #fff !important; box-shadow: 2px 2px 3px #aaa; transform: rotate(7deg); -moz-transform: rotate(7deg); -webkit-transform: rotate(7deg); -o-transform: rotate(7deg); -ms-transform: rotate(7deg);
}
so make photo polaroid photo tilted 1 side, problem border not showing white line showing border starts. works okay when reference photo html page , call photo-frame class not when apply id , pass on image externally - extremely appreciated.
thanks
use <div id="photo" class="photo-frame">
whats happening in <img id="photo" class="photo-frame">
there no src
attribute img tag becomes invalid. , secondly check if url relative stylesheet's location , not html page's location. common mistake
Comments
Post a Comment