marcsimm marcsimm - 1 month ago 12
CSS Question

align text left of a block quote

I have a blockquote and a paragraph that i'm trying o have the text align left of the blockquote like an img like here

http://www.ironspider.ca/graphics/alignment.htm

how would i do that?

<p>
skcaskckascksakcosaocksocksoososkososooososocsosokoskcoskosopapckpefjwjfoejfiewfoiewjfjwefjewfowefwefowefjwejfoewfowejfjewfoewfoewofejwofjejfiejiejfej

<blockquote>
For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally.
</blockquote>

okfoefjpowejfoewjfjewfjeiowfjoewjfowejfoewofewofjewjfoiewjfoiewfoiewiofjewo

</p>


like this

Answer

You should use CSS rather than the HTML align attributes, that are in your example.

Use float: right and give the block quote a width to suit your needs.

More about floats: https://css-tricks.com/all-about-floats/

.float-right {
  width: 50%;
  float: right;
}
<p>
<blockquote class="float-right">
    For 50 years, WWF has been protecting the future of nature. The world's leading conservation organization, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally. 
</blockquote>
skcaskcka scksakc osaocksocks oososk osos ooo so socsosokosk coskos opapc kpe fjwjfoejfie wfoi ewjfj wefjewfo wefwefowef jwejfoewfo wejfjew foew foewofej wofjejfie jiejfej  okfoef jpowejfoewjfjewfjeio wfjo ewjfowej foe wofe wofjew jfoiew jfoiew foiewiofjewo
</p>

Comments