I have a css that has background image, width, etc of all the tabs. I am trying to make customizable tabs. If the text of the tab is bigger, the background image should be changed to bigger one and also the width shouldbe increased. How is this possible. Please help me out.
#tabs a {
float:left;
background:url("../images/selection_deselect_bg.jpg") no-repeat right top;
margin:0;
white-space:nowrap;
text-decoration:none;
开发者_StackOverflow社区width:105px;
text-align:center;
height:24px;
font-size:12px;
color:#00779c;
font-weight:bold;
text-decoration:none;
} Only the background and width should be changed. How is this possible?
Thanks so much in advance.
You can use sliding doors technique:
http://www.alistapart.com/articles/slidingdoors/
Or with 1 image: http://kailoon.com/css-sliding-door-using-only-1-image/?cp=16
(CSS Sprites are nice (if you use this technique): http://www.alistapart.com/articles/sprites)
精彩评论