SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
-
Oct 28, 2007, 10:54 #1
- Join Date
- Jan 2005
- Location
- blahblahblah
- Posts
- 1,447
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
coming to CSS after an 18 months pause. What has changed?
Hi,
I'm back on using CSS and I would like to know as far as "best practice" what prevails nowadays.
1. Do people still use hacks? I guess yes, but when I left there were discussions about dropping ie5 hacks.
2. How has cross-browser designed evolved?
3. What is the current best approach to multiple cols layouts? Still floats?
4. What "best practice advice" would you give to someone like me, who knows the "language", but who must comes back into the game?
Regards,
-jj
-
Oct 28, 2007, 11:10 #2
ie7 improved the standards abit, but still sux. That is all..
-
Oct 28, 2007, 11:53 #3
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
Hi,
1) In answer to question 1 then the answer is that most people are using a more structured approach to hacks and hack management. However the only browser that needs hacking for is IE really as that is the only browser that can be reliably targeted by hacks.
All other browsers should not be hacked for and seldom need it anyway. Any problems can usually be overcome with a small change in design.
Conditional comments can be used for IE to provide a 100% safe hack management system. However you should keep the hacks to a bare minimum and once "haslayout" is understood there are very few hacks needed. IE7 is much better than ie6 but does have a few haslayout issues still but it is a big improvement on ie6.
Most of the hacks people used are because of their bad coding and mis-understanding how css works. using the right code at the right time will result in minimum use of hacks.
2)Good designers use a more professional approach and check their designs as they code in at least 4 browsers during each stage of development (safari,IE,Firefox,opera). It is no good designing for one browser then expecting it to be perfect in others as it is often then too late. You must check each step of the way and then you don't build on a feature that doesn't exist in other browsers.
I have 4 browsers open all the time and check the page at every stage. It only takes a couple of seconds but saves hours in the long run.
3) Floats are still the best option for columnar layouts and work well There are advanced techniques using negative margins that can create some very complex and interesting layouts but the concepts need to be understood fully.
4)If you are coming back after a layout them make sure you understand how css works and understand which property you need to use and why you are using it.
CSS professionals must understand the tools of the trade just like learning any language. Learning the language also means learning the bad language and catering for browser shortcomings is simply part and parcel of the job.
Best practices these days include global reset techniques.Using semantic html instead of just using divs and spans when other more semantic elements are available. Using a structured and logical approach to stylesheets and hack management.
Basically all the things that people should have been doing from the start
-
Oct 28, 2007, 14:57 #4
- Join Date
- Oct 2007
- Posts
- 42
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
-
Oct 28, 2007, 15:02 #5
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
Originally Posted by Rasmus
Bookmarks