473,776 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"display: block;" and mozilla

Hi everyone.

I am having trouble with a stylesheet in mozilla.

It is part of turning a list into a menu:

#menu li{
margin: 0;
display: inline;
vertical-align: bottom;
}

#menu li a:link, #menu li a:visited{
display: block; //works in ie but not mozilla
padding-top: 5px;
padding-right: 30px;
padding-bottom: 5px;
text-decoration: none;
text-align: right;
color: #3667A7;
width: 100%;
}

The work-around in #menu li above means that this works fine in IE.
However, in mozilla i seem to have padding in my list of li's. I know
that this is a common problem in IE but ive never seen it in mozilla.

How do i fix it?

Thanks,

Marc

Jul 21 '05 #1
7 5773
Els
Marc wrote:
Hi everyone.

I am having trouble with a stylesheet in mozilla.

It is part of turning a list into a menu:

#menu li{
margin: 0;
display: inline;
vertical-align: bottom;
}

#menu li a:link, #menu li a:visited{
display: block; //works in ie but not mozilla
padding-top: 5px;
padding-right: 30px;
padding-bottom: 5px;
text-decoration: none;
text-align: right;
color: #3667A7;
width: 100%;
}

The work-around in #menu li above means that this works fine in IE.
However, in mozilla i seem to have padding in my list of li's. I know
that this is a common problem in IE but ive never seen it in mozilla.

How do i fix it?


Set padding:0; on the <li>s?

Maybe you could post a url to the problem page? That makes it easier
to see what your problem is.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Phil Collins - In The Air Tonight
Jul 21 '05 #2
Hello.

The test url is: http://physicalactivity.northtynesidepct.nhs.uk/

I tried setting padding to 0 and it did nothing.

Thanks for your help!

marc

Jul 21 '05 #3
Els
Marc wrote:
Hello.

The test url is: http://physicalactivity.northtynesidepct.nhs.uk/

I tried setting padding to 0 and it did nothing.
When you wrote "display:inline ", I assumed you were making a
horizontal list.

Take off the display:inline, and your vertical "padding" is gone.

Before you do that though, add 'border:1px solid red' to the styles
for the <li>s, and you will see where your "padding" came from :-)
Thanks for your help!


You're welcome :-)

BTW - better check your page in Firefox and Opera, as you don't really
want those results.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: B52´s - Love Shack
Jul 21 '05 #4
Eventually had to do this:

#menu li{
margin: 0;
padding: 0;
display: inline;
vertical-align: bottom;
/*border: thin solid red;*/
}

html>body #menu li{
display: block;
}
Downloading opera now. Whats wrong with it in firefox? been testing in
firefox 1.0.3 and it looks ok!

On another note i think this is the one and only website i will be
doing with CSS. At least i knew what it would look like with layout
tables.

Thanks for your help.

marc

Jul 21 '05 #5
Els
Marc wrote:
Eventually had to do this:

#menu li{
margin: 0;
padding: 0;
display: inline;
vertical-align: bottom;
/*border: thin solid red;*/
}

html>body #menu li{
display: block;
}
Can you tell me why you are setting display:inline for a vertical
list?
Downloading opera now. Whats wrong with it in firefox? been testing in
firefox 1.0.3 and it looks ok!


In my Firefox (1.0.4), the content drops below the navigation (on
window-width of 795 pixels) and the horizontal line that's below "Home
Page" strikes through the links "search | contact us | links", and
this combination ("Home Page", horizontal line and those links) drops
down between the first and second line of the content.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Joe Jackson & Elaine Caswell - Happy Ending
Jul 21 '05 #6
Els wrote:

In my Firefox (1.0.4), the content drops below the navigation (on
window-width of 795 pixels)


This is a side effect of setting the navbar width:10em and the content
width:80%, floating doesn't help. A bad combination, for sure, since the
two elements will rarely add up to 100% of the viewport width. It looks
pretty awful at my usual larger-than-average text size, too.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 21 '05 #7
Marc wrote:
On another note i think this is the one and only website i will be
doing with CSS. At least i knew what it would look like with layout
tables.


Great! This means one less competitor to worry about!
Jul 21 '05 #8

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

Similar topics

13
40765
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div style="display:none"> can be displayed by setting the style attribute to "display:", or hidden with "display:none". This gives the illusion that the person filling out the form is switching from page to page...without the overhead of extra hits on the server,...
8
10415
by: Andy Fish | last post by:
Hi, I have a section of a web page that I want to be able to make appear and disappear with javascript, with the things below it moving up and down as appropriate. I'm not using absolute positioning or anthing fancy. I put the aforementioned section in a div: <div id="foo"> ... optional stuff in here </div>
4
7738
by: Axel Dahmen | last post by:
Hi, current browsers don't support "display: inline-block;" and "display: inline-table;", resp. Thus I'm using "float: left;" to achieve a similar effect. Problem is that if a row of elements uses this kind of block floating, they don't wrap to build a whole new line but instead get "hooked" at the left-most element being larger than the element right beside this "overflowing" element.
3
1800
by: Castal | last post by:
hello, i am trying to learn javascript. i found an example of an menu, but there is one thing i do not understand. in the source it says: ' if(thisMenu.display == "block"){......' i do not understand what 'block' means.
0
1387
by: Alan Silver | last post by:
Hello, I have noticed that setting "display:block" for a link causes IE5 to add a line break after the link. Is there a way to stop it doing this? IE6 and compliant browsers don't add the line break. If you look at http://www.kidsinaction.org.uk/fd3/060524.html in IE5 you'll see what I mean. TIA
1
4746
by: tankbattle | last post by:
That is, what's the difference between <complexType name="Address" final="restriction"> <sequence> <element name="name" type="string"/> <element name="street" type="string"/> <element name="city" type="string"/> </sequence> </complexType> and <complexType name="Address" block="restriction">
4
2943
by: Aaron Gray | last post by:
Hi, I want an "isZZZ" variable that I can use to generate "display: -moz-inline-box;" rather than "display: inline-block;" but in DOM. For this I need to know what version of Mozilla this "feature" was added and also how to detect Mozilla as a userAgent. Alternatively is there an alternative to "display: -moz-inline-box" for sticking two tables side by side ?
6
29295
chunk1978
by: chunk1978 | last post by:
hi there... i'm about to embark on my very first PHP code journey (i've been saying that for a while... so sometime soon i hope... anyway)... before i begin my exciting new journey into PHP land, i would like to know if PHP will send hidden HTML form elements or not?... for example: if a user makes a selection in my HTML form that triggers my wonderfully dynamic HTML to set a DIV to STYLE="DISPLAY:NONE", is it possible to tell PHP not...
2
8687
by: Steve Richter | last post by:
I would like to use display:inline and other CSS attributes to build an entry form. Where the heading to the left of the text box is always a set width. It is not working so I am experimenting with two divs to get them to render side by side: <div style="width:12em;border: 2px solid #EFCE8C; padding: 0.5em;display:inline;">abc</div> <div style="width:12em;border: 2px solid #EFCE8C; padding:
0
9628
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
10292
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
10122
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
9923
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8954
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
7471
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
5368
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
4031
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
2860
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.