What do you wish you knew before you spent hours t

2020-05-15 04:54发布

Mine would have to be the float and margin bugs...

If you float an element, and then specify a margin for it, it will double the margin.

The solution to this is to add display: inline to the element. This will stop the double margin, and all other browsers will ignore it because only block level objects can be floated.

23条回答
Summer. ? 凉城
2楼-- · 2020-05-15 05:04

Probably that SELECT elements dont render with the correct z-order.

For example, if you have a floating DIV with a higher z-order overlayed on top of a select - the SELECT element will still render on top of the DIV.

Infuriating.

查看更多
小情绪 Triste *
3楼-- · 2020-05-15 05:04

I Wish I'd Known That Internet Explorer Is The New Netscape Navigator 4.7.x

查看更多
神经病院院长
4楼-- · 2020-05-15 05:07

I wish I'd known why Microsoft hated me so much.

查看更多
迷人小祖宗
5楼-- · 2020-05-15 05:08

http://www.pushuptheweb.com/ or one of many other sites pushing to drop IE6 support. I'm aware that rendering web pages correctly for IE6 visitors is the core of many web businesses, but sooner or later something has to give. I just dont get why MS doesn't force an update >.<

查看更多
Ridiculous、
6楼-- · 2020-05-15 05:09

That if your really anal and spend shit loads of time on it that it pays off and you then become an IE guru fearing nothing but the sad self you have become...

Although it is nice to impress people with your amazing IE bug fixing abilities...

  1. Most IE bugs can be avoided by using different (normally better) CSS methods and super clean logical xhtml
  2. Always clear your floats with overflow hidden (or just hasLayout for IE)
  3. Understand what hasLayout is (basically a css porperty that gives IE a kick in the ass)
  4. When you start devving sites check IE6 all the time, untill your a pro ;¬P

Unfortunately, and I do train a small team of 6 developers, experience is one of the only things that really helps with these problems, stay calm, do good research in google and post your problem to a community if you really are stuck with a good demo of the problem.

Nice links >

  1. http://css-tricks.com/ie-css-bugs-thatll-get-you-every-time/ (although I recommend the PNG fix by Bob Osola /-0)
  2. http://www.gtalbot.org/BrowserBugsSection/ (amazing and funny... great!)

Good luck!

查看更多
【Aperson】
7楼-- · 2020-05-15 05:10

That even with all the PNG hacks in the world, if you're using PNGs as backgrounds in your divs (to make, for example, a panel with rounded borders), you're headed for a world of pain. (Links and other elements not being clickable, IE6 crashing in earlier versions of the png dll, etc.)

In summary: don't use transparent background PNGs if you want it to work in IE6.

查看更多
登录 后发表回答