473,699 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple "a href" classes - what am I doing wrong?

I'm trying to implement a navigation bar with multiple a href classes. The
following example works exactly as I want it to, but for Internet Explorer only.
Firefox does not indent each link.

http://jonathanwayne.com/test/test.html

Here's the relevant snippet:

<div class="nav">
<a href="#">link 0</a>
<a class="1" href="#">link 1 indentation - in IE but not FF</a>
<a class="2" href="#">link 2 indentation - in IE but not FF</a>
<a class="3" href="#">link 3 indentation - in IE but not FF</a>
</div>

The stylesheet is at:

http://jonathanwayne.com/test/test.css

Here's a snippet:

.nav a.1
{
margin-left: 30px;
}
.nav a.2
{
margin-left: 60px;
}

What am I doing wrong?

Thanks -

jon

Oct 9 '05 #1
3 3750
jwayne@_no_spam .com wrote:
I'm trying to implement a navigation bar with multiple a href classes. The
following example works exactly as I want it to, but for Internet Explorer only.
Firefox does not indent each link.
.nav a.1
{
margin-left: 30px;
}
.nav a.2
{
margin-left: 60px;
}


Start class selector names with an alpha, say a.mi, a.m2 for example.

I would think that padding might be more appropriate.

Louise
Oct 9 '05 #2
boclair <bo*****@bigpon d.net.au> wrote:
jwayne@_no_spa m.com wrote:
I'm trying to implement a navigation bar with multiple a href classes. The
following example works exactly as I want it to, but for Internet Explorer only.
Firefox does not indent each link.


.nav a.1
{
margin-left: 30px;
}
.nav a.2
{
margin-left: 60px;
}


Start class selector names with an alpha, say a.mi, a.m2 for example.

I would think that padding might be more appropriate.


Yep, yer right - I had forgotten the naming convention rule. Since IE worked ok
with a numeric, I overlooked the obvious.

(BTW, padding doesn't really work for my purpose here, as the area to the left
of the text will also be highlighted when hovering.)

Thanks -

jon

Oct 9 '05 #3
jwayne@_no_spam .com wrote:
<div class="nav">
<a href="#">link 0</a>
<a class="1" href="#">link 1 indentation - in IE but not FF</a>
<a class="2" href="#">link 2 indentation - in IE but not FF</a>
<a class="3" href="#">link 3 indentation - in IE but not FF</a>
</div>

What am I doing wrong?


Start by using proper markup:

<ul class="nav">
<li><a href="#">link 0</a></li>
<li><a href="#">link 1</a></li>
<li><a href="#">link 2</a></li>
</ul>

--
Spartanicus
Oct 10 '05 #4

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

Similar topics

3
8611
by: Phil Powell | last post by:
Has anyone here ever done a case where you have a select multiple form element and you have to do both server-side and client-side validation? I am honestly not sure how to do it in Javascript (I keep getting errors thrown that I can't verify because the form processes onto itself too quickly for me to check the Javascript errors) because the select multiple form element name has to be in the form of "var" because PHP will then recognize...
9
4910
by: Mairhtin O'Feannag | last post by:
Hello, We have two machines we wish to use DPF. They are both RH ES 2.1, with DB2 8.2. I read the documentation CAREFULLY, and added the following line to my db2nodes.cfg file : 1 egret 0
10
1295
by: Razzie | last post by:
Hi all, The title of this post may sound a bit weird, but I was wondering about the following nonetheless. I have a class libray containing, say, 4 classes: A, B, C, D. Class A somehow has a reference to B, B has a reference to C, and C to D. If an exception happens in class D, I would like class A to get a notification of this (all execution on classes B to D should be terminated). I am wondering how to do this. The following seems...
3
1839
by: Giggle Girl | last post by:
I have inherited some CSS from a former employee that has code like this: onmouseover="this.className='highlight_on standard_border'" where it appears to activate two different classes, "highlight_on" and "standard_border". Is this valid CSS?
4
4698
by: Matt Kruse | last post by:
While developing an internal IE6-only webapp, a discussion started about the 'best' way to apply classes to data tables across multiple pages. The two arguments were: 1. Apply a single class to each table. That class (possibly in combination with other classes on child elements) controls every part of the table - layout, colors, fonts, etc. Example: class="data" PROS: Easier to standardize, less specificity confusion, everything is...
2
5284
by: spolsky | last post by:
it is possible by dom(scripting) to apply multiple classes to the className attribute. elmRef.className = 'Class1 Class2 ...' ; but what if some other script assigns its own classes. in this case, it would be possible to track our classes in the className attribute(by searching in the string) and remove or add them accordingly but aren't there any flexible approach? it would be better if className is a collection that we could...
2
1719
by: Jeff | last post by:
How far back do you have to go lose support for multiple classes: <p class="class1 class2"> I'm thinking that at this time that this is widely supported. Is that about right? I'd like to add this to my bag of tricks. On a related note, I was working on something that needed a "hack" for
0
1655
by: Cirene | last post by:
Can you assist me with this database problem? I have 4 tables in my db.... Table1 (key: Table1Id) Table2 (key: Table2Id) Table3 (key: Table3Id) Table 4 has these fields: key: Table4Id Table1Id (ties it to Table 1)
0
8685
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
8613
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
9172
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
9032
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
8880
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
5869
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
4374
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...
0
4626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.