Jump to content


Photo

IE7 CSS Problem


  • Please log in to reply
11 replies to this topic

#1 Duke

Duke

    Doctor Doctor!

  • Members
  • 420 posts
  • Location:New Zealand

Posted 02 October 2009 - 07:23 AM

Hello masters.

Got a wee problem here. These is a fairly simple navigation using lists with background images.

HOWEVER

IE7 (not sure about 8) throws a spaz at this and for the life of me I cannot find a way around it.

Firefox, Opera and Chrome all show it nice-like :xcahik_:

IE7:
gore.jpg

Chrome:
gore2.jpg

#navigation li a {
		width: 176px;
		height: 100px;
		background: url(img/navbutton.png) no-repeat;
		color: #c7c7c7;
		font-family: Georgia, "Times New Roman", Times, serif;
		font-size: 18px;
		letter-spacing: 12px;
		text-align: center;
		text-decoration: none;
		margin-right: 0;
		display: block;
		float: left;
	}
		#navigation li a:hover {
			background: url(img/navbuttonh.png) no-repeat;
			color: #FFF;
		}

Anyone got any ideas?

Edited by Duke, 02 October 2009 - 08:16 AM.


#2 Beowulf

Beowulf

    Shipgirl

  • Advisors
  • 7,219 posts
  •  Azur Lane Fangirl

Posted 02 October 2009 - 07:44 AM

I've run into shit like this before. What's the HTML look like? And the nav li/ul elements?

Hard to tell from a screen shot and the anchor CSS alone.

NZ.org | BBPCG
Discord: The Astronomer#1314
Steam


#3 Duke

Duke

    Doctor Doctor!

  • Members
  • 420 posts
  • Location:New Zealand

Posted 02 October 2009 - 08:15 AM

<div id="navigation">
			<ul>			  
				<li><a href="#">Home</a></li>
				<li><a href="#">Factions</a></li>
				<li><a href="#">Gallery</a></li>
				<li><a href="#">Forums</a></li>
				<li><a href="#">Crew</a></li>
			</ul>
		</div>

Lol. Like I said, complicated stuff :xcahik_:

#4 Jeeves

Jeeves

    I write the interwebz

  • Members
  • 4,156 posts
  •  Friendly neighborhood standards Nazi

Posted 02 October 2009 - 11:47 AM

I'm always online, my kiwi friend.
Looks like the float, so try putting clear: none; on the <li>, or giving them a little space with margins.
And rule-of-thumb for IE8 is, if it works in everything else, it works. Can't do some fancy stuff but the layouts tend to hold out.

World Domination Status: 2.7%


#5 Bart

Bart

  • Network Admins
  • 8,524 posts
  • Location:The Netherlands
  • Division:Revora
  • Job:Network Leader

Posted 02 October 2009 - 01:33 PM

I think you need to apply float to the li, not the a in it.
bartvh | Join me, make your signature small!
Einstein: "We can’t solve problems by using the same kind of thinking we used when we created them."

#6 Beowulf

Beowulf

    Shipgirl

  • Advisors
  • 7,219 posts
  •  Azur Lane Fangirl

Posted 02 October 2009 - 08:09 PM

I think you need to apply float to the li, not the a in it.

That's what I thought. I had a bug vaguely similar to that with IE7 a while back. Seems like IE still can't handle block level elements all that well...

NZ.org | BBPCG
Discord: The Astronomer#1314
Steam


#7 Duke

Duke

    Doctor Doctor!

  • Members
  • 420 posts
  • Location:New Zealand

Posted 02 October 2009 - 09:30 PM

I'm always online, my kiwi friend.
Looks like the float, so try putting clear: none; on the <li>, or giving them a little space with margins.
And rule-of-thumb for IE8 is, if it works in everything else, it works. Can't do some fancy stuff but the layouts tend to hold out.


But you weren't! :xcahik_:

I think you need to apply float to the li, not the a in it.


Yep that got it.

Thank you all :p

#8 Bart

Bart

  • Network Admins
  • 8,524 posts
  • Location:The Netherlands
  • Division:Revora
  • Job:Network Leader

Posted 02 October 2009 - 09:39 PM

That's what I thought. I had a bug vaguely similar to that with IE7 a while back. Seems like IE still can't handle block level elements all that well...

I don't think that it would have worked in a good browser. If I float something inside a block, it shouldn't be doing what it did and start semi-floating the containing block. Now that seems more like a bug. Haven't tested it though...
bartvh | Join me, make your signature small!
Einstein: "We can’t solve problems by using the same kind of thinking we used when we created them."

#9 Clement

Clement

    title available

  • Network Staff
  • 1,442 posts
  • Location:France
  • Projects:Various
  •  T3A Team Chamber Member
  • Division:Revora
  • Job:Developer

Posted 04 October 2009 - 11:01 AM

http://hosted.crea2clic.net/gaw/

Just grab the code...

Edited by TDP, 04 October 2009 - 11:03 AM.

Posted Image

#10 Duke

Duke

    Doctor Doctor!

  • Members
  • 420 posts
  • Location:New Zealand

Posted 05 October 2009 - 07:19 AM

Oh I love the communication. -.-

I had nearly finished too.

#11 Bart

Bart

  • Network Admins
  • 8,524 posts
  • Location:The Netherlands
  • Division:Revora
  • Job:Network Leader

Posted 05 October 2009 - 09:26 AM

Nice communication :p :p
bartvh | Join me, make your signature small!
Einstein: "We can’t solve problems by using the same kind of thinking we used when we created them."

#12 Clement

Clement

    title available

  • Network Staff
  • 1,442 posts
  • Location:France
  • Projects:Various
  •  T3A Team Chamber Member
  • Division:Revora
  • Job:Developer

Posted 07 October 2009 - 07:38 AM

Nice communication :w00t: :omg:


LOL, it's because I have too many things almost done, and not finished completly, and I hate to show unfinished work... Thus so many things are sleeping on my Hard Drive.
Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users