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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:57:56+00:00 2026-06-09T18:57:56+00:00

I am trying to create this button without actually using the button tag. I

  • 0

I am trying to create this button without actually using the button tag. I created a button image and sliced it into three sections left-middle-right so when i add text to the link the image will expand depending on length. I am also using a hovering image – but when i try to apply this style to a button tag – the over feature doesn’t work – not sure if this is because a button tag doesn’t have a hover feature or not. But when i place this three piece image in a list format it works great displaying the hovered and un-hovered images of the ‘button’ but it doesn’t display properly on all web browsers.

Here is the list format style:

<ul class="glossyBtn">
    <li class="newBtn">
        <a style="margin-left: 12px"class="printRemove" href='<%:Url.Action("Close", "Close", new{caseId = Model.CaseId}) %>'><b><b class="bodyBtn">Close</b></b></a>
    </li>
</ul>

This is the style when having the button tag but the hover css isn’t applied.

   <ul class="glossyBtn">
   <li class="newBtn">
      <button class="noStyle" type="submit" value="save"> <a>
      <b><b class="bodyBtn">Save</b></b></a></button>
   </li>
</ul>

Here is the CSS:

.glossyBtn
{
    position: relative;
    padding: 5px 0 0 6px;
    margin: 0 auto 0 auto;
    height: 24px;
    float: left;

    list-style: none;
}
.glossyBtn li
{
    float: left;
}
.glossyBtn li a, .glossyBtn li button, .glossyBtn li input a  {
    float: left;
    color: #046fad;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    padding: 0 0 0 6px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    border-bottom: none;
}

.glossyBtn li a b, .glossyBtn li input a b {
    height: 24px;
    display: block;
    padding: 0 8px 0 8px;
}
.glossyBtn li a b.bodyBtn, .glossyBtn li input a b.bodyBtn
{
    height: 24px;
    display: block;

}
.glossyBtn li.newBtn a, .glossyBtn li.newBtn input a
{
    color: #046fad;
    background: url('images/iconPlace.png') no-repeat 0 0;
}
.glossyBtn li.newBtn a b, .glossyBtn li.newBtn input a b {
    color: #046fad;
    background: url('images/endBtn.png') no-repeat right 0;
}
.glossyBtn li.newBtn a b.bodyBtn, .glossyBtn li.newBtn input a b.bodyBtn
{
    background: url('images/bodyBtn.png') repeat-x;
}
.glossyBtn li a:hover, .glossyBtn li button a:hover {
    background: url('images/iconPlace.png') no-repeat 0 -24px;
}
.glossyBtn li a:hover b, .glossyBtn li button a:hover b {
    background: url('images/endBtn.png') no-repeat right -24px;
}
.glossyBtn li a:hover b.bodyBtn, .glossyBtn li button a:hover b.bodyBtn
{
    background: url('images/bodyBtn.png') repeat-x 0 -24px;
}

Any suggestions or alternatives to what i am trying to do would be appreciated. Thanks!

  • 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-09T18:57:58+00:00Added an answer on June 9, 2026 at 6:57 pm

    Unless I misunderstood your question, you don’t really need the three sections to get an “expanding button”. Leave the width alone and you get this automatically. Take a look: http://jsfiddle.net/HrCR8/3/

    I should credit this particular button to Chad Mazzolla and his collection of styles for creating buttons. You can find them here http://hellohappy.org/css3-buttons/

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

Sidebar

Related Questions

I'm trying to create a CSS3 button which includes an image using multiple background.
I am trying to create this QT gui using a thread but no luck.
Trying to create a background-image slideshow and am getting this error... This is the
I am trying to create a Button in Windows phone 7 without making use
I am trying to create a button using Actionscript. The only class which I
I'm trying to create a dijit button in ZF. I've tried using plain dojo
I'm trying to create a couple of buttons using jQuery, with commands like this:
I'm trying to create a push-on-push-off-like button like this one , although my code
I'm trying to dynamically create buttons at runtime with PyQT4.7 However, this being my
Im Trying to create this: |---------------------------------------------| | Panel 1a | Panel 2a | Panel

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.