473,732 Members | 2,205 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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><lielemen t.
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="">Partici pate</a></li>
<li><a href="">Program s & Services</a></li>
<li><a href="">Publica tions</a></li><li><a
href="">Standar dsStore.ca</a></li>
</ul>
</div<!-- end top button -->
</div<!-- end the header -->

CSS :

#theheader{
height: 142px;
background:tran sparent;
background: url('singlehead er.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 4483
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><lielemen t.
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><lielemen t.
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.infosystem s.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><lielemen t.
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
6886
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> tag formatted, for example, bold. However, when it's applied, the number of the <li> is not bold, but the text is. Do I have to apply the bold to the <ol> instead? 2. When I use <li>example text</li>, and when I insert a <br> after the </li>,...
5
9244
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 pointer hovers over the top-menu, the bottom margin of the top-bar expands downwards. How could I make the hover menu to stack on top of the main-body, not expanding the bottom margin of the top-bar? I believe it has something to do with...
19
17539
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 spacing? Thanks, CMA <div class="vlgray">Condition</div> <table cellpadding="0" cellspacing="0">
5
1841
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> .................... </ul> How can I do to match the <li> element that have as son the <a
4
2208
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> <li>Cccccccc <ul> <li>111111</li> <li>222222</li>
2
7632
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 away to do that with this code: <p>a</p> <ul style="margin-top: -20; padding-top: 0"> <li>1</li>
0
1568
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 div that I use as a menu on the left hand side of my page. Because the text for some of these links is wider than the div, I see some word wrap, which is fine. But altering the line-height property of the innermost element - the <aof the link -...
3
6686
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
2361
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 style="font-size:12pt;font- family:'Arial'" xml:lang="en-US" lang="en-US">Normal Text Arial 12 Black before bullets.</span></p> <ul> <li class="html_preformatted" dir="ltr" style="text- align:left">&nbsp;<span style="font-size:12pt;font-family:'Arial'"
0
8946
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8774
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9447
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9307
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9235
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8186
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.