But would your suggestion work as well if there were two lines of text in the tab?
No. If you want some of the tabs to have 2 lines, and some to have one, first you would need a height bigger than 22px to accomodate them at the current font size. So let's make the height of the tabs 28 px.
You would put the height of 0 in the "ddcolortabs a" and set the top and bottom padding for the "ddcolortabs a span" to 0. This works in both FF and IE.
Code:
.ddcolortabs a{
float:left;
color: white;
background: #678b3f url(media/color_tabs_left.gif) no-repeat left top;
margin:0 2px 0 0;
padding:0 0 1px 3px;
text-decoration:none;
letter-spacing: 1px;
height:22px; /* height here*/
}
.ddcolortabs a span{
float:left;
display:block;
background: transparent url(media/color_tabs_right.gif) no-repeat right top;
padding: 0 8px 0 7px; /* 0 padding here here*/
}
What I've done so far will vertically align the text at the top. If you want everything to be vertically aligned in the middle, you would need to add a separate class for the two line tabs, and then have a different style for one line tabs( with more padding on top and bottom) and two line tabs (with 0 padding on top and bottom).
Code:
.ddcolortabs a span.twolines{ /* this whole class is added by me for 2 lines*/
float:left;
display:block;
background: transparent url(media/color_tabs_right.gif) no-repeat right top;
padding: 0 8px 0 7px;
}
.ddcolortabs a span{
float:left;
display:block;
background: transparent url(media/color_tabs_right.gif) no-repeat right top;
padding: 6px 8px 6px 7px;
}
Bookmarks