473,387 Members | 1,574 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.

CSS buttons working in Firefox, not IE though?

Hi.

Trying to create a roll-over button effect using CSS and it's working great
in Firefox:
http://www.nathonjones.com/sitc/salmon.shtml

However, it looks totally different in IE. The first button is a different
size to the others, and all of the others seem to have a margin at the top,
so the colour fill, on hover, doesn't fill the correct area! Can anyone see
anything obvious that I'm missing as I've tried combinations of things
without success so far.

Here's my CSS for the buttons:

#leftnav {
float: left;
font-size: 0.9em;
width: 140px;
background-color: #FFFFFF;
border-width: 0 1px 0 0;
border-style: dashed;
border-color: #AABBDC;
}

#leftnav a {
height: auto;
display: block;
text-decoration: none;
border-width: 0 0 1px 0;
border-style: dashed;
border-color: #AABBDC;
font-weight: bold;
padding-left: 8px;
padding-top: 8px;
padding-bottom: 6px;
color: #7F9D7F;
}

#leftnav a:hover {
background-color: #7F9D7F;
color: #FFFFFF;
}

My navigation links are in a Server Side Include (nav.txt) and I wondered if
that might be causing problems?
The nav.txt file is simply:

<div id="leftnav">
<a href="index.shtml" style="margin-bottom:0;">Home Page</a></br>
<a href="salmon.shtml" style="margin-bottom:0;">Salmon</a></br>
....etc
</div>

Hope someone can help. Thanks.
nath.
Feb 11 '06 #1
2 4213
I had a problem with IE showing these margins too. Try also setting the
width of - #leftnav a - I would recommend setting the width in pixels
though and not percentage because you get funny results in Firefox when
you do, for example, 100%. So, in your case I will be width: 132px;
(140 - 8px for left padding). You will need to remove the <br /> from
the end of each link.

I would futher recommend placing your links in a <ul> list and setting
padding, margin and list-style to 0px and none respectively. You can
then use CSS to set the padding, borders, backgrounds etc as Im sure
your aware. This way, more basic browsers that cannot layout page
elements in the same way that desktop browsers can will still be able
to display your links in a structured manner

Hope this helps.

Burnsy

Feb 11 '06 #2
IE only recognizes hovers over <a> tages only. See the below link to
get a light weight Javascript to fix the IE bug.

http://www.htmldog.com/articles/suckerfish/dropdowns/

Dan

Feb 16 '06 #3

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

Similar topics

9
by: Brett | last post by:
Is there a script for depressible buttons that work in Mozilla and IE? This works nice but only in IE: http://www.dynamicdrive.com/dynamicindex5/depressbutton.htm. Thanks, Brett
2
by: j.mandala | last post by:
This had got to be something obvious that I am too blind to see! Funny problem: one of my users has my application linked to a SQL Server Backend. Front end it Access XP (SP3). The first form...
7
by: Jairo Nieto | last post by:
Hi, I've had this extremely weird problem for a week or so, and havent been able to solve it. My solution works fine on the production server. Once I deploy it, all buttons stop posting back...
3
by: neousr | last post by:
var row = document.createElement('TR'); row.setAttribute('class',tipoclase); ..... var cell = document.createElement('TD'); var theButton = document.createElement('input');...
6
by: AJBopp | last post by:
I'm wrestling with CSS variations between Firefox and IE. I'm trying to create rollover buttons in a menu frame. It is working perfectly in Firefox but in IE only the first button is properly...
5
by: Steve JORDI | last post by:
Just a question using images as submit buttons and PHP4.4.4. It seems that my code correctly works in FireFox but not in IExplorer. For example, I have a FORM with 2 buttons called "search" and...
6
by: Toby Inkster | last post by:
Does anyone have any idea why this effect using script.aculo.us is working in Opera, but not Firefox? http://examples.tobyinkster.co.uk/Balloons2/Balloon%20tooltip.html (I've not had the...
4
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all I have the following code: I am trying to use the value of the image button to evaluate what plan the user has chosen, i.e. it request("submit1")="Basic", then the user chose basic plan...
11
by: Twayne | last post by:
Hi, Newbie to PHP here, no C or other relevant background, so pretty niave w/r to the nuances etc. but I think this is pretty basic. XP Pro, SP2+, PHP 4.4.7, XAMPP Local Apache Server...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
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...

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.