?
Solved

CSS - Blockquote question

Posted on 2014-10-13
14
Medium Priority
?
67 Views
Last Modified: 2014-10-21
Hello,

I am trying to customize the blockquote so that the quotes appear just in front of the first letter in the text and the end quote just after.  For some reason my code is inserting space instead of having the quote inline.  My code is below.  Any help would be much appreciated.  Cheers!

blockquote {
width:350px;
quotes:"\201C" "\201D";
padding-left:30px;
	font-family:Georgia, "Times New Roman", Times, serif;
	font-style:italic;
	font-size:24px;
	/*line-height:21px;*/
	color:#494949;
	
}

blockquote:before, blockquote:after {
font:bold 60px/1px Times, serif;
color:#359800;
left: -10px;
top: -10px;
color: #7a7a7a;

}

blockquote:before {
content:open-quote;

}

blockquote:after {
content:close-quote;

}

Open in new window

0
Comment
Question by:1Cougar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
14 Comments
 
LVL 30

Expert Comment

by:Alexandre Simões
ID: 40377085
Looks good to me.
Here's a jsfiddle demo of your code: http://jsfiddle.net/AlexCode/kkph37go/

I tried it in Chrome.
0
 
LVL 19

Expert Comment

by:Montoya
ID: 40377086
when you say "inserting space.... not inline".. are you saying that the text is spreading to the next line, or do you mean that your "quotes" are not staying within the text?
0
 
LVL 19

Expert Comment

by:Montoya
ID: 40377091
I'd say to stay away from the 'width' setting, since it will limit what fits within the quotes. Just take it off, unless you have some other kind of restriction.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:1Cougar
ID: 40377220
Hello and thank you for your responses.

For some reason this code in the style.css of my wordpress site gives me the attached screen shot.  I would like to know if you have any idea why the end quote is always on the line after the last character?  Also, the line height between the text is too big.  And, is it possible to add transparency to the quotes and position them?

Many thanks again,
0
 

Author Comment

by:1Cougar
ID: 40377225
screen shot...Screen-Shot-2014-10-13-at-4.42.30-PM.png
0
 
LVL 19

Expert Comment

by:Montoya
ID: 40377259
delete width:350px;
0
 
LVL 19

Expert Comment

by:Montoya
ID: 40377261
alternatively, you could reduce your font size :)
0
 

Author Comment

by:1Cougar
ID: 40377275
Taking out width gives me this screen shot.....

Screen-Shot-2014-10-13-at-5.05.42-PM.png
0
 
LVL 19

Expert Comment

by:Montoya
ID: 40377282
that's basically because of the size of your 'container', I believe. You have to make the text smaller, to make it fit within your container.

As far as positioning quotes, and making them transparent, you could do that if you 'faked' blockquotes by creating a div structure and using two different images. If you do that, you could basically put whatever kind of quotes you want, and put them anywhere you want.

Let us know and we can help w/ that.
0
 

Author Comment

by:1Cougar
ID: 40377301
I have made the font smaller and taken width out and it is the same thing.  Screen shot attached.

Yes, I would probably prefer having the "fake" quotes with some transparency and be able to position them how I want.  If you could show with a sample fiddle perhaps....

Screen-Shot-2014-10-13-at-5.17.35-PM.png
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 40377552
Because blockquote is a block element there is a line feed before and after it.  It probably renders the way you want if you add display:inline; to the blockquote rule.

Cd&
0
 
LVL 58

Assisted Solution

by:Gary
Gary earned 1000 total points
ID: 40377664
Not sure what you are after, something like this?

http://jsfiddle.net/kkph37go/2/
0
 
LVL 19

Accepted Solution

by:
Montoya earned 1000 total points
ID: 40379606
here's a silly example: http://jsfiddle.net/iammontoya/0zjbekvn/

This in no way means that it cannot be done using blockquotes.. this is just a way to do it.
0
 

Author Comment

by:1Cougar
ID: 40394201
Hello all,

Thank you for your contributions.  I used a combination of your proposed solutions, so will divide up the points!

Cheers,
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question