Jump to content


Photo

General css advice, dealing with hacks, and other things.


  • Please log in to reply
3 replies to this topic

#1 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 29 September 2006 - 03:45 PM

I know that browser sniffing is frowned upon, I know hacks are bad to use, but when does it come to the point where you need hacks, and you don't need hacks?

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#2 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 29 September 2006 - 04:33 PM

when you create simple semantic markup.

If you use the strict doctype it forces ie render in a compliant manner  (or so far as I have experienced). Even then I have done a number of transtional sites and set out to negate the need for css hacks.

If you want to rid your self of the css hacks but waht you want to do is 'impossible' just by forming good semantic html you can use the html hack!

this involves you placing a div around every element on your page that has padding and border with another div that has no margin padding or border - just a container.

It is extra html but if you can live with it I don't care. ;)
follow me on twitter @PHPsycho

#3 dbrimlow

dbrimlow
  • Members
  • PipPipPip
  • Advanced Member
  • 712 posts

Posted 29 September 2006 - 08:40 PM

If you use the strict doctype it forces ie render in a compliant manner  (or so far as I have experienced).


Only in IE 6.0/7.0 and ONLY specifically for the "box-model" hack alone. And more <div>s are not the answer. That's commonly known as "divitus" to the css guru community.

It is so much more, in so many ways. IE 6.0 has quite a few buggy ways (other than the box model) of mangling proper standards compliant css. Most of the issues are with floats, and flexible layouts (fixed layouts and fonts - using set px sizing -  fare slightly better in IE).

Here is a great site that explains ALL of them from the author of the "holly hack" . These CSS bugs are all found only in Internet Explorer, versions 5 and higher (and they have a section on IE 6.0 bugs, as well):

http://www.positioni...t/explorer.html

But! The best way to check if you need a hack or not is to view your site on the various IE broswer versions. At my office we have a Mac with IE 5.23 for Mac. One PC with 5.1x and one with 5.5.

And of course our workstations/laptops all have 6.0. You only need to worry about IE. Nearly all of the other modern browsers are standards compliant. Chances of a user with an old Opera or Netscape are slim since most of the people who use them know what they are doing and actually use the most current version - if not they fall back on their computers IE. And Mac's Safari, even the older versions, handle standards just fine.

Incidentally, I would be happy to check anybody's finished VALIDATED standards compliant websites (that also first work as expected in IE 6.0!) and render a screenshot for you. Just send me an IM request.

Dave


Dave

I am always amazed by no matter how much I know, I know I don't know as much as I thought I knew.  - D. Brimlow.

#4 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 30 September 2006 - 01:13 PM

Thanks, I will do that, when I rebuild my site, and other's I will start messaging you to get your opinion in other browsers.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users