hilikus0826
12-07-2007, 09:32 PM
Hello,
In reference to the tutorial "Drop Down Tabs (5 styles): http://www.dynamicdrive.com/dynamicindex1/droptabmenu.htm
I am using example #3, but from what I have been able to test, this problem applies to all of the examples. I am attempting to center all content on my site by placing everything in a container div and centering. I'm using the following code to do this:
#container{
position:relative;
height:auto;
width:1004px;
margin-left:auto;
margin-right:auto;
}
Well, this works well for the tabs, but the drop downs are coming out misaligned. They are also being centered along the page, but according to a different center point. When you expand the browser window, the drop downs expand along with them (like the rest of my content), just at a different centering point. If you resize the window small enough, they will show correctly, so someone with a lower screen resolution might see these correctly, but they are still not coded the way they should for everyone to see them. These tab drop downs work perfectly when they are not in a container. Here is the CSS code I have been using for the tabs, which is almost identical of that from the example. I've changed dimensions and such to allow for my images.
.slidetabsmenu{
float:left;
width:939px;
font-size: 12px;
line-height:normal;
}
* html .slidetabsmenu{ /*IE only. Add 1em spacing between menu and rest of content*/
margin-bottom: 1em;
}
.slidetabsmenu ul{
list-style-type: none;
margin:0;
padding:0;
font: bold 14px Arial, Verdana, sans-serif;
}
.slidetabsmenu li{
display:inline;
margin:0;
padding:0;
text-transform:uppercase;
}
.slidetabsmenu a{
float:left;
background:url(media/slide-right.gif) no-repeat left top;
margin:0;
margin-right: 0px;
padding-top:11px;
text-decoration:none;
width:313px;
height:21px;
}
.slidetabsmenu a span {
color:#1c3d57;
letter-spacing: 1px;
padding: 11px 8px 11px 11px;
}
/* Commented Backslash Hack hides rule from IE5-Mac \*/
.slidetabsmenu a span {float:none;}
/* End IE5-Mac hack */
.slidetabsmenu a:hover span, .slidetabsmenu li.selected a span{
color: black;
}
.slidetabsmenu a:hover, .slidetabsmenu li.selected a{
background-position:bottom;
}
.slidetabsmenu a:hover span, .slidetabsmenu li.selected a span{
background-position:bottom;
}
html>/**/body .IEonlybr{ /*None IE browsers hack*/
display: none; /*Hide BR tag in non IE browsers, since it's not needed*/
}
/* ######### Style for Drop Down Menu ######### */
.dropmenudiv_c{
width: auto;
position:absolute;
top: 0;
border: 1px solid #918d8d; /*THEME CHANGE HERE*/
border-width:0 1px 1px 1px;
font:normal 12px Verdana;
line-height:18px;
z-index:100;
background-color: white;
visibility: hidden;
}
.dropmenudiv_c a{
width: auto;
display: block;
text-indent: 5px;
padding: 2px 0;
text-decoration: none;
font-family:Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: normal;
color: black;
width:311px;
}
* html .dropmenudiv_c a{ /*IE only hack*/
width: 311px;
}
.dropmenudiv_c a:hover{ /*THEME CHANGE HERE*/
background-color: #eaeaea;
}
You can view the example of the problem HERE (http://www.alexcarvallo.com/test/example.html)
Any and all help would be greatly appreciated. Thanks!!
In reference to the tutorial "Drop Down Tabs (5 styles): http://www.dynamicdrive.com/dynamicindex1/droptabmenu.htm
I am using example #3, but from what I have been able to test, this problem applies to all of the examples. I am attempting to center all content on my site by placing everything in a container div and centering. I'm using the following code to do this:
#container{
position:relative;
height:auto;
width:1004px;
margin-left:auto;
margin-right:auto;
}
Well, this works well for the tabs, but the drop downs are coming out misaligned. They are also being centered along the page, but according to a different center point. When you expand the browser window, the drop downs expand along with them (like the rest of my content), just at a different centering point. If you resize the window small enough, they will show correctly, so someone with a lower screen resolution might see these correctly, but they are still not coded the way they should for everyone to see them. These tab drop downs work perfectly when they are not in a container. Here is the CSS code I have been using for the tabs, which is almost identical of that from the example. I've changed dimensions and such to allow for my images.
.slidetabsmenu{
float:left;
width:939px;
font-size: 12px;
line-height:normal;
}
* html .slidetabsmenu{ /*IE only. Add 1em spacing between menu and rest of content*/
margin-bottom: 1em;
}
.slidetabsmenu ul{
list-style-type: none;
margin:0;
padding:0;
font: bold 14px Arial, Verdana, sans-serif;
}
.slidetabsmenu li{
display:inline;
margin:0;
padding:0;
text-transform:uppercase;
}
.slidetabsmenu a{
float:left;
background:url(media/slide-right.gif) no-repeat left top;
margin:0;
margin-right: 0px;
padding-top:11px;
text-decoration:none;
width:313px;
height:21px;
}
.slidetabsmenu a span {
color:#1c3d57;
letter-spacing: 1px;
padding: 11px 8px 11px 11px;
}
/* Commented Backslash Hack hides rule from IE5-Mac \*/
.slidetabsmenu a span {float:none;}
/* End IE5-Mac hack */
.slidetabsmenu a:hover span, .slidetabsmenu li.selected a span{
color: black;
}
.slidetabsmenu a:hover, .slidetabsmenu li.selected a{
background-position:bottom;
}
.slidetabsmenu a:hover span, .slidetabsmenu li.selected a span{
background-position:bottom;
}
html>/**/body .IEonlybr{ /*None IE browsers hack*/
display: none; /*Hide BR tag in non IE browsers, since it's not needed*/
}
/* ######### Style for Drop Down Menu ######### */
.dropmenudiv_c{
width: auto;
position:absolute;
top: 0;
border: 1px solid #918d8d; /*THEME CHANGE HERE*/
border-width:0 1px 1px 1px;
font:normal 12px Verdana;
line-height:18px;
z-index:100;
background-color: white;
visibility: hidden;
}
.dropmenudiv_c a{
width: auto;
display: block;
text-indent: 5px;
padding: 2px 0;
text-decoration: none;
font-family:Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: normal;
color: black;
width:311px;
}
* html .dropmenudiv_c a{ /*IE only hack*/
width: 311px;
}
.dropmenudiv_c a:hover{ /*THEME CHANGE HERE*/
background-color: #eaeaea;
}
You can view the example of the problem HERE (http://www.alexcarvallo.com/test/example.html)
Any and all help would be greatly appreciated. Thanks!!