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 8924651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:28:38+00:00 2026-06-15T07:28:38+00:00

Scenario html <div id=’fractal’> <div class=’centerdotline’> <span>Some text</span> </div> </div> css #fractal { background-image:url(‘fractal.jpg’);

  • 0

Scenario

html

<div id='fractal'>
  <div class='centerdotline'>
    <span>Some text</span>
  </div>
</div>

css

#fractal {
 background-image:url('fractal.jpg');
 background-repeat: repeat;
}
.centerdotline {
 background-image:url('dotline.png'); /* with alpha channel */
 background-repeat: repeat-x;
 background-position: center;
}
.centerdotline span {
 padding: 0 20px;

 /*
 override centerdotline background-image
 */
}

I want to remove centerdotline div ( parent ) background-image but not fractal div background-image.
I can’t set the background-image in this element (like a piece of fractal.jpg) because I don’t know the element’s exact position in relation to the fractal div

Thanks for help

Marco

  • 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-15T07:28:39+00:00Added an answer on June 15, 2026 at 7:28 am

    Perhaps This Workaround

    Not knowing specifically what your parameters are, the following solution may or may not be useful to you. I offer it, however, in case it is useful for your situation.

    Here is the fiddle example. HTML is just as you had it. I removed the line-height on the span that you said was not necessary. If you were doing that, you would need to adjust the pseudo-element height accordingly below. That height should roughly match line-height, which is typically about 1.1 or 1.2, but if set to 500px would need to be that height for the pseudo-elements.

    CSS

    #fractal {
        background-image:url('http://marcomolina.com.br/lab/fractal.jpg');
        background-repeat: repeat;
        width:500px;
        height:500px;  
    }
    .centerdotline {
        position: relative; /* using this to place the dots */
        text-align:center;
    }
    
    /* your span can also be set to display: inline-block and have top padding or margin */
    .centerdotline span {
        padding: 0 20px;
    
     /*
     Did not remove, but skipped centerdotline background image by not putting the background there to keep the background of fractal div behind the text
     */
    }
    
    /* put the dots in pseudo-elements and position off .centerdotline edges */
    
    .centerdotline span:before,
    .centerdotline span:after {
        content: '';
        position: absolute;
        height: 1.2em; /* this might vary slightly by font chosen */
        width: 40%; /* this will vary by text size */
        background-image:url('http://marcomolina.com.br/lab/dotline.png'); /* with alpha channel */
        background-repeat: repeat-x;
        background-position: center;
    }
    
    .centerdotline span:before {
        left: 0;
    }
    
    .centerdotline span:after{
        right: 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have this html scenario : <div class=parent> <a href=javascript:void(0); class=child>Link</a> <a href=javascript:void(0);
I have the following HTML scenario: <div> <input id=txt0 type=text /><input type=checkbox id=chk0 /></div>
So I have a div and I added a background image via CSS. I
I have the following example: http://jsfiddle.net/LAMdV/ HTML: <div id=imageSlider> <span class=info id=info1> hello world
Imagine this scenario: in our company there is an employee that play around graphic,css,html
Here is my scenario, a ul list with a holder div that has HTML
I have an HTML as following: <html> <head> <style type=text/css> a {color: red} </style>
This is my code : HTML <div class="item"> &nbsp; </div> <div class="item"> <div class="item-abs">
Well I would reproduce in a html page this scenario. I have a div
In a scenario where I am appending something like a div to the html

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.