CSS Menu Lines Up Offline but Not Online (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


Mehdi -> CSS Menu Lines Up Offline but Not Online (8/3/2007 14:37:44)

http://soccer-europe.com/cssmenuoffline.jpg
http://soccer-europe.com/cssmenuonline.jpg

http://soccer-europe.com/newindex2.html

As it looks fine offline I'm not sure what I need to do to fix it. I've made some notes in the code.

<style type="text/css">
#info {
POSITION: relative
}

body {
margin: 0px;
padding: 5px;
font-family: Helvetica, Verdana, Tahoma, sans-serif;
color: #000;
}

p.bold {
PADDING-LEFT: 15px; COLOR: #fff
}
a.linkup {
POSITION: relative
}
a.buttonup {
BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; LEFT: 650px; BORDER-BOTTOM-WIDTH: 0px;
POSITION: absolute; TOP: 200px; BORDER-RIGHT-WIDTH: 1px
}
a.buttonup img {
BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px;
BORDER-RIGHT-WIDTH: 0px
}
.gleft {
FLOAT: left; MARGIN: 25px 0px 0px
}
.gright {
FLOAT: right; MARGIN: 25px 5px 0px 0px
}
.grc {
MARGIN: 20px 0px 0px 10px
}
.menu {
BORDER-RIGHT: #fff 1px solid; FONT-SIZE: 0.85em; Z-INDEX: 100; WIDTH: 745px; POSITION: relative;
HEIGHT: 50px
}
html .menu {
WIDTH: 800px
}

<!-- menu margin from left of page -->
.menu ul {
PADDING-RIGHT: 0px; PADDING-LEFT: 50px; PADDING-BOTTOM: 20px; MARGIN: 0px; PADDING-TOP: 0px;
LIST-STYLE-TYPE: none
}
.menu ul ul {
WIDTH: 129px
}

<!-- top menu width between each box -->
.menu li {
FLOAT: left; WIDTH: 139px; POSITION: relative
}
.menu a {
BORDER-RIGHT: #fff 0px solid; BORDER-TOP: #fff 1px solid; DISPLAY: block; PADDING-LEFT: 10px;
FONT-SIZE: 13px; BACKGROUND: #cd4039; BORDER-LEFT: #fff 1px solid; WIDTH: 138px; COLOR: #fff; LINE-HEIGHT:
29px; BORDER-BOTTOM: #fff 1px solid; HEIGHT: 30px; TEXT-DECORATION: none
}

<!-- menu font size, margin, height -->
.menu a:visited {
BORDER-RIGHT: #fff 0px solid; BORDER-TOP: #fff 1px solid; DISPLAY: block; PADDING-LEFT: 10px;
FONT-SIZE: 14px; BACKGROUND: #cd4039; BORDER-LEFT: #fff 1px solid; WIDTH: 128px; COLOR: #fff; LINE-HEIGHT:
29px; BORDER-BOTTOM: #fff 1px solid; HEIGHT: 30px; TEXT-DECORATION: none
}
 html .menu a {
WIDTH: 118px
}

<!-- top menu width -->
 html .menu a:visited {
WIDTH: 128px
}

<!-- menu font size, margin, height -->
.menu ul ul {
BORDER-TOP: #000 0px solid; LEFT: 0px; VISIBILITY: hidden; WIDTH: 129px; POSITION: absolute; TOP: 41px;

HEIGHT: 0px
}
 html .menu ul ul {
TOP: 31px
}
.menu ul ul ul {
LEFT: 149px; WIDTH: 149px; TOP: -1px
}
.menu ul ul ul.left {
LEFT: -149px
}

<!-- placement of first sub menu links -->
.menu table {
LEFT: -50px; POSITION: absolute; TOP: 1px; BORDER-COLLAPSE: collapse
}
.menu ul ul a {
BORDER-TOP-WIDTH: 0px; PADDING-RIGHT: 10px; PADDING-LEFT: 10px; BORDER-LEFT-WIDTH: 1px;
BACKGROUND: #cd4039; BORDER-BOTTOM-WIDTH: 1px; PADDING-BOTTOM: 5px; WIDTH: 128px; COLOR: #fff;
LINE-HEIGHT: 1em; PADDING-TOP: 5px; HEIGHT: auto; BORDER-RIGHT-WIDTH: 1px
}

<!-- spacing between sub menu links -->
.menu ul ul a:visited {
BORDER-TOP-WIDTH: 0px; PADDING-RIGHT: 0px; PADDING-LEFT: 10px; BORDER-LEFT-WIDTH: 1px;
BACKGROUND: #cd4039; BORDER-BOTTOM-WIDTH: 1px; PADDING-BOTTOM: 5px; WIDTH: 128px; COLOR: #fff;
LINE-HEIGHT: 1em; PADDING-TOP: 5px; HEIGHT: auto; BORDER-RIGHT-WIDTH: 1px
}
 html .menu ul ul a {
WIDTH: 128px
}

<!-- width of sub menu links -->
 html .menu ul ul a:visited {
WIDTH: 128px
}
.menu a:hover {
BACKGROUND: #000000; COLOR: #fff
}
.menu ul ul a:hover {
BACKGROUND: #000000; COLOR: #fff
}
unknown {
BACKGROUND: #ffffff; COLOR: #fff
}
.menu ul li:hover ul {
VISIBILITY: visible
}
.menu ul a:hover ul {
VISIBILITY: visible
}
.menu ul :hover ul ul {
VISIBILITY: hidden
}
.menu ul :hover ul :hover ul {
VISIBILITY: visible
}
</style>


<div class="menu">
<ul>

<li><a  href="Archives/Menu.html">Archives<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>

<li><a  href="Data/Menu.html">Data<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>

<li><a href="#">Championships<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->

<ul>
<li><a href="EPL/Menu.html">English Premier League</a></li>
<li><a href="Seriea/Menu.html">Serie A</a></li>
<li><a href="UCL/Menu.html">UEFA Champions League</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>

<li><a href="#">Multimedia<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->

<ul>
<li><a href="Multimedia/Menu.html">Audio & Video</a></li>
<li><a href="http://www.soccer-europe.com/gallery/main.php">Photo Gallery</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>

<li><a  href="Transfers/Menu.html">Transfers<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
</ul>
</div>




rdouglass -> RE: CSS Menu Lines Up Offline but Not Online (8/3/2007 15:10:21)

I can't address the CSS specifically but it really looks trashed in FF. My general rule of thumb is to make things look the way I want them in FF then adjust for IE. You will see sooooo many more of your issues right away in FF and can fix them before they compound into something like this.

Another thing, are you publishing *all* the correct CSS files, JS, files and any other associated stuff to the live site? I have found that sometimes the paths are different on some of my localhost webs and the CSS needs adjustment (in terms of paths and such)




Mehdi -> RE: CSS Menu Lines Up Offline but Not Online (8/3/2007 16:06:44)

quote:

ORIGINAL: rdouglass

I can't address the CSS specifically but it really looks trashed in FF. My general rule of thumb is to make things look the way I want them in FF then adjust for IE. You will see sooooo many more of your issues right away in FF and can fix them before they compound into something like this.

Another thing, are you publishing *all* the correct CSS files, JS, files and any other associated stuff to the live site? I have found that sometimes the paths are different on some of my localhost webs and the CSS needs adjustment (in terms of paths and such)


There's no java. I have lined it up perfectly in Firefox but it's now out of whack in IE6.

Update
I think I've got it. I would be grateful if someone would check in their browsers, both firefox and IE6. The css menu is ok in Firefox, everything else is a mess:)




Tailslide -> RE: CSS Menu Lines Up Offline but Not Online (8/3/2007 16:26:25)

The menu's messed up in Camino and Safari on the mac.

You might want to look at a different menu. The Accessible Suckerfish menu is quite good as is the one that Womble came across recently - I'm just putting this one into a site now (it looks pretty much the same as your current one) and it's keyboard accessible and the top level works with JS off.




Mehdi -> RE: CSS Menu Lines Up Offline but Not Online (8/3/2007 16:48:17)

I played around with the suckerfish menus but I want it to look like the one I'm using and I my css isn't anywhere near good enough to make the necessary changes to the code.

I'll make a start with the FreeStyle Menus. Thanks for the link. Just when I though I'd nearly finished….




Mehdi -> RE: CSS Menu Lines Up Offline but Not Online (8/3/2007 21:34:21)

http://soccer-europe.com/newindex.html

I've switched to the FreeStyle Menus script. It's working fine but I'm a bit annoyed by the delay in the drop downs but that's just me being fussy.

Sorry to be a pain but I'm having problems with these validation errors:

Line 21, Column 31: document type does not allow element "div" here; assuming missing "object" start-tag.
<div style="TEXT-ALIGN: center"></div>

Line 44, Column 10: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.
<ul class=menulist id=listMenuRoot>

Line 44, Column 22: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.
<ul class=menulist id=listMenuRoot>

Line 122, Column 5: document type does not allow element "body" here.
<body>

I placed body before the start of the text.

I think the rest of the errors are due to the placement of the body tag?




Tailslide -> RE: CSS Menu Lines Up Offline but Not Online (8/4/2007 3:33:56)

The body tag needs to be straight after the closing head tag and the other ones are because you've forgotten the double quote marks around the ids and classes (id="whatever").




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625