I am trying to achieve a button, which would look same (its background) no matter how wide it will be (the longer text inside, the wider button).
For button image i would use 1 pixel wide image:
– it have 5 pixels black on top, and then 35 pixels red. And i use that css to repeat the background:
background-image:url('../images/button.png');
background-repeat: repeat-x;
Now, it will look like this: 











But i want to use these two images as a left and right side of the button:

So it would like the button is curved on the top corners, and it will look like a real button. Is it even possible?
So, the question is, how can i use 3 images as a background of a div, or any other thing, to make it look like one, whole button, with middle part repeating as many times, as it needs, to fill it.
Desired look: 
PS. I painted that in MSPaint a sec ago, so don’t mind the quality of curving, or colors, i just wanted it to be visible.
Did you try googling this before you posted? There are many sites and examples out there on how to do this. Try searching for “css tabs with rounded corners” and see what you get…
Here are 2 links to start with, but in future try a simple Google search before posting a question.
Example Code from http://www.sitepoint.com/accessible-menu-tabs/
Or a Repository of more Tutorials etc: http://www.bitrepository.com/rounded-corners-tab-menus.html
You will definitely find something to work for you there….