This is a discussion on "width working in IE but not FF" within the Web Page Design section. This forum, and the thread "width working in IE but not FF are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
width working in IE but not FF
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
width working in IE but not FF
I'm used to Firefox displaying CSS correctly and IE being a royal pain, so this particular issue came as a surprise: I can't get FF to display the declared width of a hyperlink. Here's the relevant code:
Using FF 2.0, ie 7. !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" Anybody got a clue? |
|
|
|
|||
|
Re: width working in IE but not FF
Hmm - OK, you're right (and thanks for the feedback), but the thing is, I don't want it to be a block. That causes the link to be displayed all by it's lonesome, on a line by itself. But I want to use a graphic as a bullet next to the link - IOW to use the default display:inline element.
I played around with a bunch of display: arguments but haven't found one that works. I'm about to give up and use a table to force the alignment, which will make me weep uncontrollably for at least 3 seconds. |
|
||||
|
Re: width working in IE but not FF
Well ... this is a menu then? You should be using a unordered list for this (<ul>). And just float the li element to the left, set up a width and display: block in the a.
As for the bullet, put it as a background.
|
|
|||
|
Re: width working in IE but not FF
Ah - that explains everything. I started out trying to write
ul.nav {} li.nav {} ...etc. Bad syntax doesn't work, for some odd reason. Thanks a lot! |
|
|||
|
Re: width working in IE but not FF
*sigh*
Well, that didn't work either. To heck with it, I'm using tables. |
|
||||
|
Re: width working in IE but not FF
The code you posted above would imply the html below
|
|
||||
|
Re: width working in IE but not FF
Quote:
PLEASE READ: How and When to post your question! |
|
||||
|
Re: width working in IE but not FF
IT'S EASY KIDS! Use float!
ul.nav{ whatever } ul.nav li{ width:120px; } /* or whatever */ ul.nav li a{ display:block; float:left; } /* now the link with fill the entire li */ if that fails, add the following: ul.nav li a{ width:100%; } (I'm only saying this because I haven't tested it)
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Last edited by spinal007; May 29th, 2007 at 02:09. |
|
||||
|
Re: width working in IE but not FF
Blasphemy!
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
|
|
||||
|
Re: width working in IE but not FF
Try:
|
![]() |
| Tags |
| css, firefox, width |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| div width | drappendix | Web Page Design | 2 | Aug 22nd, 2007 14:34 |
| div width | drappendix | Web Page Design | 4 | Aug 21st, 2007 04:46 |
| Input width | PicoDeath | Web Page Design | 3 | Jul 31st, 2007 16:03 |
| set CORRECT width for <img/> | iersel | Web Page Design | 8 | Jul 27th, 2006 07:33 |
| Max-Width in All Browsers | purus | Web Page Design | 4 | May 16th, 2005 22:12 |