Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8847829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:17:03+00:00 2026-06-14T12:17:03+00:00

I’m trying to find a solution to the following problem, if there is any.

  • 0

I’m trying to find a solution to the following problem, if there is any.

Lets say the primary quote sign is a double top quote “ (start) and ” (end). And let’s also say the secondary quote sign is a single top quote ‘ (start) and ’ (end).

Think about how a quote in a quote is shown.

The standard of writing quotes is, of course, alternating, like this.

“Double ‘single “double ‘single’ double” single’ double.”

Now, in HTML, you would write this:

<q>Double <q>single <q>double <q>single </q>double </q>single </q>double.</q>

But no, this won’t work without applying CSS rules. I’m not going to use the :lang pseudo selector here, so I’m just leaving it without.

q:before,
q q q:before,
q q q q q:before { content: '“' }

q:after,
q q q:after,
q q q q q:after { content: '”' }

q q:before,
q q q q:before,
q q q q q q:before { content: '‘' }

q q:after,
q q q q:after,
q q q q q q:after { content: '’' }

You see where this is going, right? The qs add up and up.

So now there are two options: either I’m not seeing the logical way to select the q elements in the right order or it just isn’t possible.

PS: I know it is very theoretical to have a quote in a quote in a quote in a quote in a quote.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:17:05+00:00Added an answer on June 14, 2026 at 12:17 pm

    I couldn’t get this to work with just CSS selectors nth-child(odd) and nth-child(even) since they’re nested, but it is possible using jQuery:

    First define your CSS classes:

    .e:before {content:'“'}
    .o:before {content:'‘'}
    .e:after {content:'”'}
    .o:after {content:'’'}
    

    Then use jQuery to add the class to every even/odd quote:

    $("q:odd").addClass('o');
    $("q:even").addClass('e');
    

    Demo

    Related questions:

    • CSS refer to every odd nested child?
    • querySelector with nested nth-child in Chrome doesn’t appear to work
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.