Jump to content

More Problems with Lists in IE???


Skipjackrick

Recommended Posts

So can anybody help me figure out why the sub-list shows up about 50px too far to the right when viewed with Internet Explorer??

 

I have tried to just hack away at the code changing each variable and this is the best I can come up with.

 

Firefox displays perfectly.

 

http://www.extremecoast.com/Kayak_Wars/standings07.html

 

 

If any of you guys know.  I'd really appreciate it.  Just in case you need the CSS files.

 

@charset "UTF-8";

/* SpryMenuBarHorizontal.css - Revision: Spry Preview Release 1.4 */

/* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */

/*******************************************************************************

LAYOUT INFORMATION: describes box model, positioning, z-order

*******************************************************************************/
ul, ol, dl {
    position: relative;  
}
/* The outermost container of the Menu Bar, an auto width box with no margin or padding */
ul.MenuBarHorizontal
{
margin: 0;
padding: 0;
list-style-type: none;
font-size: 100%;
cursor: default;
width: auto;
}
/* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
ul.MenuBarActive
{
z-index: 1000;
}
/* Menu item containers, position children relative to this container and are a fixed width */
ul.MenuBarHorizontal li
{
margin: 0;
padding: 0;
list-style-type: none;
font-size: 100%;
position: relative;
text-align: left;
cursor: pointer;
width: 100%;
float: left;
}
/* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
ul.MenuBarHorizontal ul
{
margin: 0;
padding: 0;
list-style-type: none;
font-size: 10px;
z-index: 1020;
cursor: default;
width: 100px;
position: absolute;
left: -1000em;
top: 80%;
}
/* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
{
left: auto;
}
/* Menu item containers are same fixed width as parent */
ul.MenuBarHorizontal ul li
{
width: 15em;
}
/* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
ul.MenuBarHorizontal ul ul
{
position: absolute;
margin: -5% 0 0 95%;
}
/* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
{
left: auto;
top: 0;
}

/*******************************************************************************

DESIGN INFORMATION: describes color scheme, borders, fonts

*******************************************************************************/

/* Submenu containers have borders on all sides */
ul.MenuBarHorizontal ul
{
border: black;
}
/* Menu items are a light gray block with padding and no text decoration */
ul.MenuBarHorizontal a
{
display: block;
cursor: pointer;
background-color: transparent;
padding: 0.5em 0.75em;
color: #333;
text-decoration: none;
}
ul.MenuBarHorizontal ul li
{
display: block;
cursor: pointer;
background-color: #0099FF;
padding: 0;
color: #333;
text-decoration: none;
}
/* Menu items that have mouse over or focus have a blue background and white text */
ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
{
background-color: transparent;
color: #FFF;
}
/* Sub Menu items that have mouse over or focus have a blue background and white text */
ul.MenuBarHorizontal ul li a:hover, ul.MenuBarHorizontal  ul li a:focus
{

background-color: transparent;
color: #FFF;
}
/* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
{
background-color: transparent;
color: #FFF;
}

/*******************************************************************************

SUBMENU INDICATION: styles if there is a submenu under a given menu item

*******************************************************************************/

/* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal a.MenuBarItemSubmenu
{
background-image: url(SpryMenuBarDown.gif);
background-repeat: no-repeat;
background-position: 95% 50%;
}
/* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
{
background-image: url(SpryMenuBarRight.gif);
background-repeat: no-repeat;
background-position: 95% 50%;
}
/* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
{
background-image: url(SpryMenuBarDownHover.gif);
background-repeat: no-repeat;
background-position: 95% 50%;
}
/* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
{
background-image: url(SpryMenuBarRightHover.gif);
background-repeat: no-repeat;
background-position: 95% 50%;
}

/*******************************************************************************

BROWSER HACKS: the hacks below should not be changed unless you are an expert

*******************************************************************************/

/* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
ul.MenuBarHorizontal iframe
{
position: absolute;
z-index: 1010;
}
/* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
@media screen, projection
{
ul.MenuBarHorizontal li.MenuBarItemIE
{
	display: inline;
	f\loat: left;
	background: #FFF;
}
}

 

 

 

/* Top Elements */
* { margin: 0; padding: 0; outline: 0 }

body {
background: #CCC;
font: 70%/1.5em Verdana, Tahoma, arial, sans-serif;
color: #555; 
text-align: center;
}

/* links */
a, a:visited {
text-decoration: none;
color: #2180BC;
background: inherit;
}
a:hover {
color: #606060;
background: inherit;
text-decoration: underline;
}

/* headers */
h1, h2, h3 {
font-family: 'Trebuchet MS', Tahoma, Sans-serif;	 		
}
h1 {
font-size: 150%;	
font-weight: normal;
color: #006699;
}
h2 {
font-size: 140%;
text-transform: uppercase;
color: #006699;
}
h3 {
font-size: 120%;
color: #666666; 
}

/* images */
img {
background: #FAFAFA;
   border: 1px solid #E5E5E5;
padding: 5px;
}
img.float-right {
  margin: 5px 0px 10px 10px;  
}
img.float-left {
  margin: 5px 10px 10px 0px;
}

h1, h2, h3, p {
padding: 10px;		
margin: 0;
}
ul, ol {
margin: 5px 20px;
padding: 0 20px;
}

code {
  margin: 5px 0;
  padding: 10px;
  text-align: left;
  display: block;
  overflow: auto;  
  font: 500 1em/1.5em 'Lucida Console', 'courier new', monospace ;
  /* white-space: pre; */
  background: #FAFAFA;
  border: 1px solid #f2f2f2;  
}
acronym {
  cursor: help;
  border-bottom: 1px dotted #777;
}
blockquote {
margin: 10px;
	padding: 0 0 0 28px;  
   border: 1px solid #f2f2f2; 
  	background: #FAFAFA url(quote.gif) no-repeat 5px 5px;    
}

/* start - table */
table {
border-collapse: collapse;
margin: 10px auto;
}
th strong {
color: #fff;
}
th {
background: #006699;
height: 29px;
padding-left: 12px;
padding-right: 12px;
color: #FFF;
text-align: center;
border-left: 1px solid #B6D59A;
border-bottom: solid 2px #FFF;

}
tr {
height: 30px;
}
td {
padding-left: 11px;
padding-right: 11px;
border-left: 1px solid #FFF;
border-bottom: solid 1px #ffffff;
}
td.first,th.first {
border-left: 0px;
}
tr.row-a {
background: #F8F8F8;
}
tr.row-b {
background: #EFEFEF;
}
/* end - table */

/* form elements */
form {
margin:10px; padding: 0 10px;
background-color: #FFF; 	
}
label {
display:block;
font-weight:bold;
margin:5px 0;
}
input {
padding:2px;
border:1px solid #eee;
font: normal 1em Verdana, sans-serif;
color:#777;
}
textarea {
width:400px;
padding:2px;
font: normal 1em Verdana, sans-serif;
border:1px solid #eee;
height:100px;
display:block;
color:#777;
}
input.button {
font: bold 12px Arial, Sans-serif;
height: 24px;
margin: 0;
padding: 2px 3px;
color: #FFF;
border: none;
background-color: #003399;
background-image: url(button-bg.jpg);
background-repeat: repeat-x;
background-position: 0 0;
}

/* search form */
.searchform {
background-color: transparent;
border: none;	
margin: 0; padding: 5px 0 15px 0;	
width: 190px;	
}
.searchform p { margin: 0; padding: 0; }
.searchform input.textbox { 
width: 120px;
color: #777; 
height: 18px;
padding: 2px;	
border: 1px solid #E5E5E5;
vertical-align: top;
}
.searchform input.button { 
width: 60px;
height: 24px;
padding: 2px 5px;
vertical-align: top;
}

/********************************************
   LAYOUT
********************************************/ 
#wrap {
width: 820px;
background: #CCC url(content.jpg) repeat-y center top;
margin: 0 auto;
text-align: left;
}
#content-wrap {
clear: both;
width: 760px;
padding: 0; 
margin: 10px auto;
}

#header {
width: 820px;
position: relative;
height: 103px;
background: #CCC url(header.jpg) no-repeat center top;
padding: 0;	
color: #FFF;	
}
#header h1#logo-text a {
position: absolute;
margin: 0;
padding: 0;
font: bolder 44px 'Trebuchet MS', Arial, Sans-serif;
letter-spacing: -2px;
color: #FFF;
text-transform: none;
text-decoration: none;
background: transparent;
/* change the values of top and left to adjust the position of the logo*/
top: 31px;
left: 47px;

}
#header p#slogan {
position: absolute;
margin: 0;
padding: 0;
font: normal 12px 'Trebuchet MS', Arial, Sans-serif;
text-transform: none;
color: #FFF;
/* change the values of top and left to adjust the position of the slogan*/
top: 86px;
left: 55px;
width: 192px;

}

/* header links */
#header #header-links {
position: absolute;
top: 20px; right: 30px;	
color: #C6DDEE;
font-size: 10px;	

}
#header #header-links a {	
color: #FFF;
text-decoration: none;	
}
#header #header-links a:hover {
color: #606060;	
}

/* Menu */
#menu {
clear: both;	
margin: 0 auto; padding: 0;
background: url(menu.jpg) repeat-x 0 0;	
font: bold 12px/37px Verdana, Arial, Tahoma, Sans-serif;
height: 37px;
width: 780px;	
}

#menu ul {
background-color: transparent;
float: right;
list-style: none;
margin:0; padding: 0;
display: inline;
}
#menu li {

background-color: transparent;
display: inline;
}
#menu ul li a {
display: block;
float: left;
padding: 0 12px;
color: #FFFEA7;	
text-decoration: none;
}
#menu ul li.last a {
padding-right: 20px;	
}
#menu ul li a:hover {
color: #606060;	
}
#menu ul li#current a {	
color: #D4E59F;
}

/* Main Column */
#main {
float: left;
width: 98%;
padding: 0; margin: 5px 0 0 5px;
display: inline;
}
#main h2 {
margin: 10px auto;
font: Bold 140% 'Trebuchet MS', Tahoma, Sans-serif;
color: #003399; 
padding: 5px 0 5px 5px; 	
border-bottom: 1px solid #EFF0F1;	
text-transform: none;
}
#main h2 a {
background: none;
color: #003399;
text-decoration: none;
}

#main ul li {
list-style-image: url(bullet.gif);
}

.post-footer {
padding: 5px; margin: 20px 10px 10px 10px;
font-size: 95%;	
}
.post-footer .date {
background: url(clock.gif) no-repeat left center;
padding-left: 20px; margin: 0 10px 0 5px;
}
.post-footer .comments {
background: url(comment.gif) no-repeat left center;
padding-left: 20px; margin: 0 10px 0 5px;
}
.post-footer .readmore {
background: url(page.gif) no-repeat left center;
padding-left: 20px; margin: 0 10px 0 5px;
}

/* Sidebar */	
#sidebar {
float: right;
width: 26.5%;
padding: 0; margin: 0;	
color: #68774A;	
}	
#sidebar h3 {
margin-top: 10px;
padding: 5px 5px;
font: bold 1.4em 'Trebuchet MS', Tahoma, Sans-serif;
color: #003399;
}
#sidebar ul.sidemenu {
list-style: none;
text-align: left;
margin: 7px 4px 8px 0; padding: 0;
text-decoration: none;		
background: url(dots.jpg) repeat-x left top;
}
#sidebar ul.sidemenu li {
list-style: none;
background: url(dots.jpg) repeat-x left bottom;
padding: 4px 0 4px 5px;
margin: 0 2px;	
color: #68774A;	
}
* html body #sidebar ul.sidemenu li {
height: 1%;
}
#sidebar ul.sidemenu li a {
text-decoration: none;	
background-image: none;	
color: #666666;			
}
#sidebar ul.sidemenu li a:hover {	
color: #1773BC;	
}
#sidebar ul.sidemenu ul { margin: 0 0 0 5px; padding: 0; }
#sidebar ul.sidemenu ul li { background: none; }


/* Footer */	
#footer {
color: #C6DDEE;
background: #CCC url(footer.jpg) no-repeat center top;
clear: both;
width: 820px;
height: 65px;
text-align: center;	
font-size: 92%;	
}
#footer a { 
color: #FFF;
text-decoration: none; 
}

/* alignment classes */
.float-left  { float: left; }
.float-right { float: right; }
.align-left  { text-align: left; }
.align-right { text-align: center; }

/* display and additional classes */
.clear { clear: both; }

Link to comment
Share on other sites

You have over 400 errors in your code:

 

http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.extremecoast.com%2FKayak_Wars%2Fstandings07.html

 

Problems like the ones you are speaking of are often caused by combinations of these errors.

 

One of the things I would strongly recommend however is not using an XHTML strict doctype until you are very comfortable with XHTML. You are using deprecated commands (align for example) and many other things that arent allowed in that doctype. You should first use the xhtml  transitional doctype, and then when you learn how to code properly in that doctype, then you should switch to the strict doctype.

 

So to fix your problem, first you should change your doctype. This will drop the number of errors your code is showing. Then go through and fix those errors one at a time. Then after you have them fixed, if your problem is still there, come back here and ask us to look at it. If you having troubles understanding any of the errors in the meantime, then ask here about it, and I'm sure someone can help you. Good luck!

Link to comment
Share on other sites

a lot of times i like to use dl, dt, and dd for css formating, then you dont have to worry about list-style, etc..

 

also.. in the start of you style sheet it is good practice to make dl, ul, etc padding: 0px, and margin-left: 1em;.. this will help with IE/firefox problems..

Link to comment
Share on other sites

another thing i noticed was you were naming the ul... ul id="blah"

 

i have ran into a lot of problems that are fixed by not doing this.... reference it by what div it is in.. example..

 

#menu ul {

...

}

 

#menu li {

.....

}

 

i have found that this works great.. also NEVER use the global call.. *{padding:0; margin:0;} .. its a nightmare.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.