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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:37:00+00:00 2026-06-18T07:37:00+00:00

For a site I’m making I have to create the following block. I have

  • 0

For a site I’m making I have to create the following block.

alt text

I have the following CSS that creates a white box with rounded edges and a shadow when used with the HTML below.

<style type="text/css">
    .stripeblock {
        width: 310px;
        border-radius: 12px;
        background-color: #fff;
        padding: 10px;
        box-shadow: 0 8px 6px -6px black;
    }
</style>

<div class="stripeblock">
    <h1>Just some title</h1>
    <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to...</p>
</div>

The only thing missing is the green horizontal stripe, I tried a couple of things but can’t get it in properly.
I would like it to be included via the CSS and not be a seperate element within the div.
Is this possible?

  • 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-18T07:37:01+00:00Added an answer on June 18, 2026 at 7:37 am

    You can absolutely do this, without any extra images or markup.

    Just use the ‘:before’ pseudo element to style a block and place it where it needs to be.

    Try this:

    .stripeblock:before {
        background: #c8d300;
        content: "";
        display: block;
        height: 7px;
        position: absolute;
        top:0;
        left: 20px;
        width: 125px;   
    }
    

    And make sure you add position: relative; to your .stribeblock to the :before; block is positioned correctly.

    .stribeblock {
        position: relative;
    }
    

    Check out the results, here: http://jsfiddle.net/qVFeT/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
My site has three columns. I have two fields within a form that need
Site that have nice but raising number of visits / hits, heavily operates on
My site has a drop-down menu built in CSS and JavaScript that drops down
Site here . Why is it that the code works for $('#club').change(function(event) but not
Site in question: http://mtthwbsh.com For my mobile nav I am using the following script
My site currently implements custom 404 pages which we have mapped in IIS. So
Site in question: http://www.mtthwbsh.com I'm building a collapsable nav for this site and have
Site in question: http://mtthwbsh.com I'm attempting to create a collapsable nav where when toggled,
Site: http://sebastiano.freehostia.com/ CSS: /style.css I'm not overly sure what's going wrong with the positioning

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.