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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:17:41+00:00 2026-06-01T21:17:41+00:00

Right now we have a web page with a bunch of link sections on

  • 0

Right now we have a web page with a bunch of link sections on one page. Each section has a header like so:

enter image description here

This header background is actually two images. The first is just a rectangle and the second has the slanted side on it. As I was looking at this solution, I was wondering if I could solve this with CSS instead of images. While I am not a CSS guru, I did look at a number of examples and was able to get something similar working. However, when I attempt to put text on top of the background, it ends up above the color instead of inside it. The CSS I have also has a fixed size, which is less than idea. I would rather specify a percentage of the available area and have it fill in the color.

Here is the code I’ve been working with:

<STYLE type="text/css">
  .mini_banner 
  {
     display:inline;
     border-bottom:30px solid blue; 
     border-left:0px solid transparent;
     border-right:30px solid transparent;
  }
</STYLE>

I wanted to apply this to a cell in a table. I also don’t want to break compatibility with modern browsers. My “customers” (mostly internal people) are going to be primarily on IE8 or later but I don’t want to limit myself if I can help it.

So first, is this possible? Second, how would I accomplish this? And third, is there a way to make it relative in scale instead of fixed?

  • 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-01T21:17:42+00:00Added an answer on June 1, 2026 at 9:17 pm

    I would say that you’ll have less headaches all the way around if you revert to using a single background image – in this case, a white image with the notch cut out (a PNG-24 with alpha transparency). Make it bigger than you think you need by about 200%, then do something like this:

    .minibanner {
       background: blue url(..images/notch.png) no-repeat middle right;
       font-size: 1.5em;
     }
    

    The reason is that relying on border sizes may result in some whackiness across browsers, and it will definitely look weird if any element runs to two lines.

    If you make the notch image 200-300% larger, but vertically align it in the middle of the background, and you do increase the font-size, the box will grow, but your white notch will grow right along with it.

    UPDATE:

    The only other way I can see pulling this off is to add a non-semantic element, such as a or something similar, after your text:

    <div>
        <p>Hello text</p>
        <span></span>
    </div>
    

    Then in your CSS:

        p { 
            background: blue; 
            color: white;
            float: left;
            padding: 0 20px;
            height: 50px;
            margin:0;
            line-height: 50px;
            }
        span {
            width: 0;
            height: 0;
            border-top: 50px solid transparent;
            border-bottom: 0px solid transparent;
            display: inline-block;
            border-left: 50px solid blue;
        }
    

    See this JSFiddle.

    The shape is based on this tutorial on CSS triangles. Now, I’ve only tried this on a webkit based browser, and it works. You will have to adjust the heights every time you want to change font size, so that is a drawback.

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

Sidebar

Related Questions

Here is the thing. Right now I have this e-commerce web site where people
I have my core web-app code in the header right now in a tag
Here is what I've got right now... I have a web page that when
Right now I have a base class for my pages which inherits System.Web.UI.Page and
I'm currently working on web application using VB in ASP.NET. Right now I have
I have a problem here. Right now I'm doing my Web Based Application, my
Right now I have a link that causes a hidden div to appear when
Okay right now I have too include the code below on every single page
I have a web page which has a form at the top and a
I have to fetch multiple web pages, let's say 100 to 500. Right now

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.