473,405 Members | 2,262 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Different <ul><li> behaviours between browsers

Syl
Hello experts!!

The top menu navigation bar displays perfectly in IE, but does not
display properly in Mozilla or Netscape :
http://checkeredshirt.com/textonly.html

For some reason the non-IE browers are forcing the top navigation menu
to dislpay "staggered" after the the first <ul><lielement.
Can anyone see why this is happening ?

Any guidance is very appreciated.

HTML :
<div id="theheader">
<div id="topbutton">
<ul>
<li id="current"><a href="">Home</a></li>
<li><a href="">About the SCC</a></li>
<li><a href="">NSS</a></li>
<li><a href="">News & Events</a></li>
<li><a href="">Participate</a></li>
<li><a href="">Programs & Services</a></li>
<li><a href="">Publications</a></li><li><a
href="">StandardsStore.ca</a></li>
</ul>
</div<!-- end top button -->
</div<!-- end the header -->

CSS :

#theheader{
height: 142px;
background:transparent;
background: url('singleheader.gif') no-repeat;
width: 744px;
border: none;
}

#topbutton {
width: 620px;
height: 40px;
padding-left: 160px;
padding-top:30px;
margin-bottom: 0.5em;
margin-left: 0em;
font-family: 'Geneva', 'Arial', sans-serif;
font-variant: small-caps;
font-size: 10px;
text-align: center;
border: none;
}

#topbutton ul {
margin: 0;
padding: 0;
border: none;
list-style: none;
}

#topbutton li {
color: #000;
background: transparent;
display: inline;
border: none;
padding-right: 2px;
padding-left: 2px;
padding-top: 2px;
padding-bottom: 20px;
font-size: 10px;
font-style: bold;
font-variant: small-caps;
font-family: 'Geneva', 'Arial', sans-serif;
}

#topbutton li a {
float: left;
width: 70px;
height: 25px;
padding-right: 2px;
padding-left: 2px;
padding-top: 2px;
padding-bottom: 20px;
color: #000;
background-color: transparent;
text-decoration: none;
font-size: 10px;
font-style: bold;
font-variant: small-caps;
font-family: 'Geneva', 'Arial', sans-serif;
}

html>body #topbutton li a {
float: left;
width: 70px;
height: 25px;
}

#topbutton li a:hover {
border: 1px solid rgb(224,224,224);
color: #000;
background: transparent;
display: inline;
padding-right: 1px;
padding-left: 1px;
padding-top: 2px;
padding-bottom: 20px;
font-size: 10px;
font-style: bold;
font-variant: small-caps;
font-family: 'Geneva', 'Arial', sans-serif;
}

#topbutton li a:current {
border: 1px solid #ccc;
padding-right: 2px;
padding-left: 2px;
padding-top: 2px;
padding-bottom: 20px;
background-color: transparent;
color: #000;
font-variant: small-caps;
font-size: 10px;
font-style: bold;
font-family: 'Geneva', 'Arial', sans-serif;
}

Nov 28 '06 #1
5 4460
On Tue, 28 Nov 2006 12:17:41 -0800, Syl wrote:
Hello experts!!

The top menu navigation bar displays perfectly in IE, but does not
display properly in Mozilla or Netscape :
http://checkeredshirt.com/textonly.html

For some reason the non-IE browers are forcing the top navigation menu
to dislpay "staggered" after the the first <ul><lielement.
Can anyone see why this is happening ?
<li id="current"><a href="">Home</a></li>

#topbutton li a:current {
border: 1px solid #ccc;
padding-right: 2px;
padding-left: 2px;
padding-top: 2px;
padding-bottom: 20px;
background-color: transparent;
color: #000;
font-variant: small-caps;
font-size: 10px;
font-style: bold;
font-family: 'Geneva', 'Arial', sans-serif;
}
Is there any reason you feel you need to style 'Home' separately from the
other list members? Except for its position it looks exactly the same to
me on the page in Firefox. If you _must_, let it inherit or default
everything except the specific things you want to make different from the
other <lielements. You can more easily tell you didn't change something
that would alter the position it displays from the way the other <li>'s
display.


Nov 28 '06 #2
On Tue, 28 Nov 2006 20:56:20 +0000, mbstevens wrote:
On Tue, 28 Nov 2006 12:17:41 -0800, Syl wrote:
>Hello experts!!

The top menu navigation bar displays perfectly in IE, but does not
display properly in Mozilla or Netscape :
http://checkeredshirt.com/textonly.html

For some reason the non-IE browers are forcing the top navigation menu
to dislpay "staggered" after the the first <ul><lielement.
Can anyone see why this is happening ?

<li id="current"><a href="">Home</a></li>

#topbutton li a:current {
border: 1px solid #ccc;
padding-right: 2px;
padding-left: 2px;
padding-top: 2px;
padding-bottom: 20px;
background-color: transparent;
color: #000;
font-variant: small-caps;
font-size: 10px;
font-style: bold;
font-family: 'Geneva', 'Arial', sans-serif;
}
Is there any reason you feel you need to style 'Home' separately from the
other list members? Except for its position it looks exactly the same to
me on the page in Firefox. If you _must_, let it inherit or default
everything except the specific things you want to make different from the
other <lielements. You can more easily tell you didn't change something
that would alter the position it displays from the way the other <li>'s
display.
Well, that, and the fact that you have given the li the id 'current', but
only have a style for 'li a current' -- unless I've missed it somewhere in
my quick reading.

Nov 28 '06 #3
And lo, Syl didst speak in
comp.infosystems.www.authoring.stylesheets,alt.www.webmaster:
Hello experts!!
Don't be cute; you already know you'll find naught but layabouts here.
The top menu navigation bar displays perfectly in IE, but does not
display properly in Mozilla or Netscape :
http://checkeredshirt.com/textonly.html

For some reason the non-IE browers are forcing the top navigation menu
to dislpay "staggered" after the the first <ul><lielement.
Can anyone see why this is happening ?

Any guidance is very appreciated.
First off, I will say that I found your problem. However, before I get to
that, I'll also say that correcting it is just putting a patch on the
greater problem of your CSS margin/padding addiction.

Margins and paddings are nice, but they must be used *sparingly*. A basic
example: if you are going to enclose one block within another, don't half
the padding and give half to each block. Instead, apply *all* of the
required padding to just one block. This keeps inline-element padding and
margin-collapse inconsistancies across platforms to a minimum.

You need to review this stylesheet and start minimising. Keeping things
simple will not only help you edit the code easily in the future, but will
also assist those whom you ask to debug for you.

With that said, the answer:
#topbutton li {
color: #000;
background: transparent;
display: inline;
border: none;
padding-right: 2px; /* Remove this or set to 0px; */
padding-left: 2px; /* Remove this or set to 0px; */
padding-top: 2px;
padding-bottom: 20px;
font-size: 10px;
font-style: bold;
font-variant: small-caps;
font-family: 'Geneva', 'Arial', sans-serif;
}
Why is the left and right padding causing this strange error in Firefox?
Who can say with all the other mish-mashed paddings and margins in there.

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollary that nothing is ridiculous.
- http://www.greywyvern.com/orca#search - Orca Search: Full-featured
spider and site-search engine
Nov 28 '06 #4
Syl wrote:
The top menu navigation bar displays perfectly in IE, but does not
display properly in Mozilla or Netscape :
http://checkeredshirt.com/textonly.html
I would debate "perfectly". The text is so small, there is no chance I
can read it.

Drop the 0.6em and the 10px stuff, and use percentages - 100% - for font
size. In Firefox, I need to press Control-Plus about three times, and in
IE, to adjust to Larger, and when I do you layout falls apart.

Since you've not assigned a background color to body, I see my default
purple...

--
-bts
-Motorcycles defy gravity; cars just suck
Nov 29 '06 #5
One
Beauregard T. Shagnasty wrote:
Syl wrote:
The top menu navigation bar displays perfectly in IE, but does not
display properly in Mozilla or Netscape :
http://checkeredshirt.com/textonly.html

I would debate "perfectly". The text is so small, there is no chance I
can read it.

Drop the 0.6em and the 10px stuff, and use percentages - 100% - for font
size. In Firefox, I need to press Control-Plus about three times, and in
IE, to adjust to Larger, and when I do you layout falls apart.

Since you've not assigned a background color to body, I see my default
purple...
Thank you very much for your comments and advice.

It is appreciated.

Nov 30 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Michael | last post by:
This is a two-part question to which I haven't been able to find an answer anywhere else. 1. Is it possible to format the bullet/number character of the <li>? In my styles sheet, I have the <li>...
5
by: toylet | last post by:
Attached is some css codes for a website. It has 3 parts: top-bar, side-bar (on the left) and main-body. The top-bar has a mouseover menu called top-menu implemented via ul:hover. When the mouse...
19
by: CMAR | last post by:
I have the following markup. The problem is that the browser, e.g., IE6, inserts several lines of blank space between the <div> and the following table. Is there a way to minimize that vertical...
5
by: Steel | last post by:
Hi at all, please consider this : <ul> <li><a>No link</a></li> <li><a href="#">This is a link</a></li> <li><a>No link</a></li> <li><a href="#">This is a link</a></li> .......................
4
by: abs | last post by:
Anybody has an idea how to get the <ul> element which is not nested in <li> element ? In other words I have several lists like this: <ul id="1"> <li>Aaaaaaaa</li> <li>Bbbbbbbb</li>...
2
by: Shaun | last post by:
Hello! I have a quick question regarding CSS and having it applied to all elements. I am trying to eliminate the gap between a paragraph and a list that usually occurs in html and I've found...
0
by: jkn | last post by:
Hello all I'm having some problems with a list within a menu div. I'm a fairly naive CSS user and suspect there's a concept or two I'm missing... I have an unordered list of link tests within a...
3
by: Man-wai Chang | last post by:
A 2 columns x 10 rows matrix input form <ul> <li> <ul> <li>item name 1 <li><input type="textbox" name="input_col_1_row_1"> <li><input type="textbox" name="input_col_1_row_2"> </ul> <li>
2
by: Shahid | last post by:
Hi, I am parsing an .HTML file that contains following example code: <div> <p class="html_preformatted" awml:style="HTML Preformatted" dir="ltr" style="text-align:left"><span...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.