css - without div: text an headline with background over an image -
i want place headline + text background color on image (in upper right corner) don´t know if work without div around h1 , p tag. work chained selectors? im little bit baffled. how solve positioning question?
here´s code:
<div class="class1 class2 "> <h1>headline</h1> <p>text</p> <figure class="class3 class4"> <img class="at2x" width="950" height="609" alt="" src=""> </figure> </div>
and fiddle
because wrote can't use image background, imho should in this example.
html
<div class="class1 class2 "> <h1>headline</h1> <p>text</p> <figure class="class3 class4"> <img class="at2x" width="950" height="609" alt="" src="http://placekitten.com/950/609"> </figure> </div>
css
.class1 { position: relative; } .class3 { position: absolute; z-index: -1; top: 0; left: 0; margin: 0; }
this of course 1 of options.
Comments
Post a Comment