Teensweb
New Member
- Messages
- 352
- Reaction score
- 1
- Points
- 0
Is there anyway to make the following code work in all browsers even while following the web standards?
Code:
/* this is the clipping region for the menu. it's width and height get set by script, depending on the size of the items table */
.transMenu {
position: absolute;
overflow: hidden;
left: -1000px;
top: -1000px;
}
/* this is the main container for the menu itself. it's width and height get set by script, depending on the size of the items table */
.transMenu .content {
position: absolute;
left: 20px;
}
/* this table comprises all menu items. each TR is one item. It is relatively positioned so that the shadow and background transparent divs can be positioned underneath it */
.transMenu .items {
position: relative;
left: 0px;
top: 0px;
z-index: 7;
}
.transMenu.top .items {
border-top: none;
}
/* this DIV is the semi-transparent white background of each menu. the -moz-opacity is a proprietary way to get transparency in mozilla, the filter is for IE/windows 5.0+. */
/* we set the background color in script because ie mac does not use it; that browser only uses a semi-transparent white PNG that the spacer gif inside this DIV is replaced by */
.transMenu .background {
position: absolute;
left: 0px;
top: 0px;
z-index: 1;
-moz-opacity: .8;
filter: alpha(opacity=80);
}
/* same concept as .background, but this is the sliver of shadow on the right of the menu. It's left, height, and background are set by script. In IE5/mac, it uses a PNG */
.transMenu .shadowRight {
width: 2px;
position: absolute;
z-index: 3;
top: 3px;
-moz-opacity: .4;
filter: alpha(opacity=40);
}
/* same concept as .background, but this is the sliver of shadow on the bottom of the menu. It's top, width, and background are set by script. In IE5/mac, it uses a PNG */
.transMenu .shadowBottom {
position: absolute;
z-index: 1;
left: 3px;
height: 2px;
-moz-opacity: 100;
filter: alpha(opacity=40);
}
/* this is the class that is used when the mouse is over an item. script sets the row to this class when required. */
/* each TR.item is one menu item */
.transMenu .item{
margin: 0px;
border: none;
display: block; /* this is a hack for mac/ie5, whom incorrectly cascades the border properties of the parent table to each row */
font-size: 11px;
cursor: pointer;
cursor: hand;
}
.transMenu .item td {
height: 18px;
line-height: 18px;
font-size: 11px;
color: #000;
}
.transMenu .item.hover {
background: #3fb1fd;
}
.transMenu .item.hover td {
}
/* this is either the dingbat that indicates there is a submenu, or a spacer gif in it's place. We give it extra margin to create some space between the text and the dingbat */
.transMenu .item img {
margin-left: 10px;
}
/* Added classes by Khanh - 050629 */
.transMenu .item#active {
background: #8BB448;
color: #FFFFFF!important;
-moz-opacity: .6;
filter: alpha(opacity=60);
}
.transMenu .item#active.hover {
color: #FFFFFF;
}
/* For first level menu.*/
#wrap {
margin: 0px;
padding: 0px;
}
#menu {
margin: 0px;
padding: 0px;
}
#menu td {
width: 80px;
text-align: center;
}
#mbttransmenu {
margin: 0px;
padding: 0px;
width: auto;
}
a.mainlevel-trans:link, a.mainlevel-trans:visited {
clear: both;
margin: 1px 0 0 0;
border-right: 1px solid #1C351C;
display: block;
white-space: nowrap;
color: #FFFFFF;
text-decoration: none;
line-height: 32px;
height: 30px;
width: 80px;
text-align: center;
font-size: 11px;
}
a.mainlevel-trans:hover {
background: url(../images/tab-hover.gif) repeat-x;
text-decoration: underline;
}
a.mainlevel_active-trans, a.mainlevel_active-trans:active {
clear: both;
width: auto;
margin: 0;
display: block;
white-space: nowrap;
border-right: 1px solid #759275;
background: url(../images/tab-active.gif) repeat-x bottom #648364;
line-height: 33px;
height: 33px;
color: #FFFFFF;
font-size: 11px;
text-decoration: none;
}
a.mainlevel_active-trans:hover {
color: #FFFFFF;
}
/* End added */