473,782 Members | 2,531 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<UL> bigger indent in FireFox.

Hello all,

I'm have an annoyance I can't seem to solve. I'm working on a website that
has a sidebar floating to the right. In the sidebar is an unordered list. In
IE and in Opera, the list shows up as I want - aligned left. In FF, the list
displays in the middle of the sidebar, totally ignoring the margin, it
seems. In fact the main menu, which is styled similarly, also shows the same
issue. You can see an example here:

http://www.ssaes.org/test_site

You can see the <ul> in the sidebar seems as if it's ignoring my margin
styling. The alternate main menu has the same problem. The actual menu is a
JavaScript menu, but I've provided an alternate list-based menu utilizing
the <noscript> tag. If you turn off JavaScript, you'll see the main menu,
and you'll see that that's indented also.

The page validates to the HTML 4.01 Strict standard. Here's the html for the
<ul>

<div id="sidebar">
<script type="text/javascript" src="memticker. js"></script>
<br>
<p style="color: red; text-decoration: underline"><b>R elated
Links:</b></p>
<ul>
<li>Read the <a href="principal _letter.htm">Pr incipal's
Letter</a></li>
<li>See tonight's <b><a href="homework. shtml">HOMEWORK </a></b>
assignments.</li>
<li><a href="edu_resou rce.htm">Educat ion Resources</a> for kids and
Teachers</li>
<li><a href="links.htm ">Armenian Links</a></li>
<li>See <a href="about.htm ">pictures</a> from the 5th grade class trip to
Armenia.</li>
</ul>
</div>

And here's my CSS:

#sidebar ul {
font-size: 90%;
text-align: left;
list-style-image: url('arrow.gif' );
margin-left: 15px;
}

#sidebar li {
padding-bottom: 0;
padding-left: 0;
margin-left: 0;
}

#sidebar p {
text-align: left;
}

Any ideas as to why the margin shows up different in FireFox? Thanks in
advance for any replies.
Viken K.
Dec 8 '05 #1
4 7780
Deciding to do something for the good of humanity, Viken Karaguesian
<vikenkNO_SPAM@ NO_SPAMcomcast. net> spouted in
comp.infosystem s.www.authoring.html:
Any ideas as to why the margin shows up different in FireFox? Thanks in
advance for any replies.


Firefox has a default left padding of 40px on <ul>. I find the best way
to get consistent results across browsers is to set

* {margin: 0; padding: 0;}

at the top of my CSS file, and then just add the padding and margins I
need.

--
Mark Parnell
=============== =============== =============== ========
Att. Google Groups users - this is your last warning:
http://www.safalra.com/special/googlegroupsreply/
Dec 8 '05 #2
> Firefox has a default left padding of 40px on <ul>. I find the best way
to get consistent results across browsers is to set
My css styling of the <ul> does not override FF's defaults?
* {margin: 0; padding: 0;}
at the top of my CSS file, and then just add the padding and margins I
need.


I've seen this done before, and I've always wondered what the asterisk does.
Is it used as a wildcard, like in the normal computer lingo? So * {margin:0;
padding:0} means *all* margins and padding in the document?

Thanks for the reply Mark.

Viken K.
Dec 8 '05 #3
Deciding to do something for the good of humanity, Viken Karaguesian
<vikenkNO_SPAM@ NO_SPAMcomcast. net> spouted in
comp.infosystem s.www.authoring.html:
My css styling of the <ul> does not override FF's defaults?
You aren't setting any padding on it, so no.
I've seen this done before, and I've always wondered what the asterisk does.
Is it used as a wildcard, like in the normal computer lingo? So * {margin:0;
padding:0} means *all* margins and padding in the document?


Correct.
http://www.w3.org/TR/CSS2/selector.h...ersal-selector

--
Mark Parnell
=============== =============== =============== ========
Att. Google Groups users - this is your last warning:
http://www.safalra.com/special/googlegroupsreply/
Dec 8 '05 #4
> My css styling of the <ul> does not override FF's defaults?
You aren't setting any padding on it, so no.


Ah yes....thanks for pointing that out. I had set padding for the <li>
but not for <ul>. Made the change and all is now well.

Thank you!

Viken K.

Dec 8 '05 #5

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

Similar topics

8
4664
by: bearclaws | last post by:
I am looping through a list of categories and want to display the list horizontally (instead of vertically). I want to create a single row with 4 list items in each cell of the row. I thought this would work but I get this error: "End tag 'xsl:if' does not match the start tag 'ul'." Any thoughts?
8
53692
by: dp | last post by:
Is there anyway to have the bullet color of a <li> be a different color than the text without using an image? dp
4
2210
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>
6
6972
by: Jean Pion | last post by:
Dear Readers, With the following CSS I wanted to create a list, where there is no empty line between the 'title' and the list. Also put the bullets closer to the left margin. And the spacing between two list should be one line. ul.tight {margin-top:0em; margin-left:1.3em;} The html then looks like this
2
2573
by: Andrew Donaldson | last post by:
I'd welcome some help in understanding what's going on with graphical browsers in the navigation list at: http://www.bounceandtickle.org.uk/index.html (This site is not about what it might seem from the URL!) I'm using a <ul> for the gimmicky teddy bear links. The teddy is a background image for each <li>. Each link 'button' is an <a> within an <li>, and I'm trying to get the button to appear partway down the teddy
10
12910
by: Alan Silver | last post by:
Hello, In my (seemingly) endless quest to understand CSS, I have yet another problem. Please look at http://www.kidsinaction.org.uk/ph/x.html in Opera, where you will see it how I expected. If you look at it in IE (6 or 7), you find it also looks fine, except for the top margin missing from the links across the top of the page. That's not the main issue here, but any pointers as to why it doesn't show them would be appreciated.
5
4485
by: Syl | last post by:
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 ?
2
1831
by: cityman007 | last post by:
Hi Somebody help me to solve the problem with <ul><li> with images. I used images with Hspace and Vspace and beside the images i make list. its overlapping in Firefox and not seen in IE7 http://www.goalsettingthatworks.com/demo/index.html mycode: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
0
9639
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
9479
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
10146
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...
0
8967
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...
1
7492
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6733
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();...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4043
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
2874
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.