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

  • Home
  • SEARCH
  • 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 8594429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:11:54+00:00 2026-06-12T00:11:54+00:00

Pseudo elements not showing on a div. I’m using a sprite image but I

  • 0

Pseudo elements not showing on a div. I’m using a sprite image but I have tried a non-sprite image as well, yet nothing. I tried multiple strategies, such as positioning absolute, using z-index, margins, etc. I seem to be doing it correctly if I’m not mistaken or apparently I am doing something wrong. I’m new to the community and have searched here and also Google yet no result as to why it is not showing.The code is below in it’s most basic try. Thanks to all who take the time to help.

.test {
    display:inline-block;
    background:#fff;
    width:60%;
}

.test:before,
.test:after {
     background:url("/imgs/Sprite2.png") repeat-y;
}

.test:before,
.test:after {
    position:relative;
    display:inline-block;
    vertical-align:top;
    width:27px;
    height:100%;
}

.test:before {
    content:"";
    background-position:0 0;
}

.test:after {
    content:"";
    background-position:-55px 0;
}

I now have it working. The code is below. I could of sworn that I already tried this but I must have did something wrong the first time I did it.

 .test {
     background:#fff;
     width:60%;margin:0  0 60px 5%;
 }

 .test:before,
 .test:after {
     content:"";
     background:url("/imgs/Sprite2.png") repeat-y;
     position:absolute;
     top:0;
     width:27px;
     height:100%;
 }

 .test:before {
     right:100%;
     background-position:0 0;
 }

 .test:after {
     left:100%;
     background-position:-55px 0;
 }   
  • 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-12T00:11:55+00:00Added an answer on June 12, 2026 at 12:11 am

    Heres’s the corrected answer, since I never showed that I answered it using the button. I just placed it in the top thinking that it would be considered answered. Basically I must’ve done something wrong the first time somewhere. Hope this helps people who have had problems similar to mines.

    .test {
        background: #fff;
        width: 60%;
        margin: 0 0 60px 5%
    }
    
    .test:before, .test:after {
        content: "";
        background: url("/imgs/Sprite2.png") repeat-y;
        position: absolute;
        top: 0;
        width: 27px;
        height: 100%
    }
    
    .test:before {
        right: 100%;
        background-position: 0 0
    }
    
    .test:after {
        left: 100%;
        background-position: -55px 0
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can an image have pseudo-elements? In my testing I have not been able to
I'm looking for a method to inspect elements styled using pseudo-classes (such as :hover
i have a div with overflow-y: hidden; and a have a pseudo element to
I have problem designing pseudo-code for these problems. It is not an assignment problem.
Does someone knows why Google Chrome browser does not supports 3d transformations for pseudo-elements
I know that the :before , and :after pseudo elements are not supported in
On this MS compatibility table it says, IE9 does not support pseudo-elements ::before and
I'm using the pseudo element :after on my H4 elements, and giving them an
I have a form that has hidden elements in it to create a pseudo-array
I am using jquery addClass code to show/hide elements when rolling over a div.

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.