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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:36:22+00:00 2026-05-25T15:36:22+00:00

Usually when I create buttons using gradients, or sections and buttons using shadow or

  • 0

Usually when I create buttons using gradients, or sections and buttons using shadow or rounded edges, I use something like the following CSS format to allow the contained content to be any length:

#button {
    height: 40px;
}

.button_edge_left {
    float: left;
    width: 4px;
    height: 40px;
    background: url(images/button-left_static.png);
}

.button_middle_cont {
    float: left;
    padding: 12px 10px;
    font: bold 16px Arial, Helvetica, sans-serif;
    height: 40px;
    background: url(images/button-middle_dynamic.png);
}

.button_edge_right {
    float: left;
    width: 4px;
    height: 40px;
    background: url(images/button-right_static.png);
}

Above is my CSS where .button_edge_left and .button_edge_right act as either end (left/right) of a button and .button_middle_cont acts as the middle portion which can expand horizontally.

For good measure, html HTML:

<div id="button">
<div class="button_edge_left"></div>
<div class="button_middle_cont">This is a button!</div>
<div class="button_edge_right"></div>
</div>

I’m wondering if there’s anyway to remove the two edge classes, and somehow create an element which brings together all three classes?

Although there’s more overhead, this is a lot easier from an editing point of view then having individual static images for each button on a page.

  • 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-05-25T15:36:23+00:00Added an answer on May 25, 2026 at 3:36 pm

    CSS3 allows for multiple background images to be assigned to a single element.

    #button {
        padding: 12px 10px;
        font: bold 16px Arial, Helvetica, sans-serif;
        height: 40px;
        background: url(images/button-left_static.png) left top no-repeat, url(images/button-right_static.png) right top no-repeat, url(images/button-middle_dynamic.png);
    }
    

    Again, this solution is only viable for CSS3 compliant browsers (IE >= 9, Opera >= 10.5, Firefox >= 3.6, Chrome/Safari >= 1.3).

    These images stack in the order they are written, therefore the first background image will be the more foreground background, and as such you should put your repeating image last.

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

Sidebar

Related Questions

Usually when I need to fork in C, I do something like this: pid_t
Usually, when using Windows Authentication, the software (eg Internet Explorer) tries to use Windows
I usually create my SQL tables and stored procedures by writing a script inside
Hey I usually run into a situation where I will create a class that
Usually Flash and Flex applications are embedded on in HTML using either a combination
Usually when I build a site, I put all the CSS into one file,
Is it possible to create a certain number of 'buttons' based on the number
Usually when I subscribe to an event, I use the Visual Studio builtin function
I've created a toolbar button in OneNote like Daniel Escapa showed . Usually, it
In ASP.Net I usually drive my primary navigation using a standard web.sitemap file such

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.