I have created an image to illustrate my problem:

As you can see. I have a large rounded button. it consists of 3 images. One image is on the right side, another on the left size and another one in the middle.
The left and right images are quite wide because there is a gradient going on in the button so I cannot make them just 5px wide. The problem now is, that the text inside is limited to the middle area. I would like it to stretch across the entire button.
Here are my styles:
#index-navigation ul li a {
height: 96px;
line-height: 96px;
text-decoration: none;
font-weight: bold;
font-size: 1em;
color: #333;
background: url('/images/btn_grey@2x-right.png') right center no-repeat;
padding-right: 100px;
}
#index-navigation ul li a span.left {
background: url('/images/btn_grey@2x-left.png') left center no-repeat;
padding-left: 100px;
}
#index-navigation ul li a span.middle {
background: url('/images/btn_grey@2x-middle.png') left center repeat-x;
}
How to edit the style to be able to have the anchor take the entire width of the button? Like this:

You have to move your text to a separate
spanto be able to stretch it across the wholea. Just give your.leftand.rightthe appropriate backgrounds, let theahold the main bg – http://jsfiddle.net/JutRB/3/UPDATE
Or if you want a CSS3 solution and don’t care about the older IE-s then you can use the
:beforeand:afterpseudo-elements with much cleaner markup – http://jsfiddle.net/JutRB/4/