I am trying to create a snippit of HTML which looks like this:
I've written some code, but the background, italics, and left side quotes are not displaying correctly. Here's what I've tried:
mission blockquote.style1 {
font: 14px/20px italic;
padding: 8px;
background-color: #000000;
border-top: 1px solid #e1cc89;
border-bottom: 1px solid #e1cc89;
margin: 5px;
background-image: url(../images/openquote1.gif);
background-position: top left;
background-repeat: no-repeat;
text-indent: 23px;
}
.mission blockquote.style1 span {
display: block;
background-image: url(images/openquote1.gif);
background-repeat: no-repeat;
background-position: bottom right;
}
<div class=""mission>
<h2>Mission</h2>
<hr>
<blockquote>
<p class="style1">
<span>Our mission is to grow with our customers by providing quality products,timely delievery & personalised services</span>
</p>
</blockquote>
</div>
CSS has rules and standards, when you don't follow them you can't expect "magic" to happen.
You didn't:
mission blockquote.style1
is not the same as .mission blockquote .style1
)font
property rules (must have font-family, must be in correct order)class=""mission
is just wrong)On top of that:
Long story short: Take your time to write proper code.
.mission blockquote .style1 {
font: italic 14px/20px serif;
padding: 8px;
/* background-color: #000000;*/
border-top: 1px solid #e1cc89;
border-bottom: 1px solid #e1cc89;
margin: 5px;
/* background-image: url(../images/openquote1.gif);*/
background-position: top left;
background-repeat: no-repeat;
text-indent: 23px;
}
.mission blockquote .style1 span {
display: block;
/* background-image: url(images/openquote1.gif);*/
background-repeat: no-repeat;
background-position: bottom right;
}
<div class="mission">
<h2>Mission</h2>
<hr>
<blockquote><p class="style1"><span>Our mission is to grow with our customers by providing quality products,timely delievery & personalised services</span></p></blockquote>
</div>