473,387 Members | 1,791 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,387 software developers and data experts.

<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>Related
Links:</b></p>
<ul>
<li>Read the <a href="principal_letter.htm">Principal's
Letter</a></li>
<li>See tonight's <b><a href="homework.shtml">HOMEWORK</a></b>
assignments.</li>
<li><a href="edu_resource.htm">Education 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 7747
Deciding to do something for the good of humanity, Viken Karaguesian
<vikenkNO_SPAM@NO_SPAMcomcast.net> spouted in
comp.infosystems.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.infosystems.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
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...
8
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
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...
6
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...
2
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...
10
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...
5
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...
2
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 ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.