Here's something I have been wondering about lately:
When making a web page, if you are creating creating an effect (or anything else) which can be accomplished by more than one method, which would you choose (or think is "best"), and why?
For example... rounded corners. You can place an image in there, or do it with javascript, or use CSS (I think), and probably other methods as well. Which one do you pick? Why? (Rounded corners is JUST an example, the question is meant to apply to any situation where this choice may arise, so feel free to elaborate).
I usually try to go with the most efficient method... either most efficient for me (in coding time) or for the user (smallest file size, most compatible across multiple browsers. This usually depends on the situation. If I can get away with just CSS (rounded corners, for example) I'll try to go that route since it doesn't force the user to download extra images or use javascript. Though it's a tradeoff, since CSS rounded corners aren't supported in all browsers... I try to avoid Javascript, or at least make sure that the website is functional and usable even if it is disabled.
I agree with falkencreative. CSS would be my first choice. I don't really think javascript is efficient as an image substitute. I generally use progressive enhancement on the websites I create so rounded corners aren't rounded in IE, however, if I did need to round the corners in IE, I would create the images and apply them with an IE specific stylesheet.
When making a web page, if you are creating creating an effect (or anything else) which can be accomplished by more than one method, which would you choose (or think is "best"), and why?
For example... rounded corners. You can place an image in there, or do it with javascript, or use CSS (I think), and probably other methods as well. Which one do you pick? Why? (Rounded corners is JUST an example, the question is meant to apply to any situation where this choice may arise, so feel free to elaborate).
Looking forward to some insight, thanks!
I generally use progressive enhancement on the websites I create so rounded corners aren't rounded in IE, however, if I did need to round the corners in IE, I would create the images and apply them with an IE specific stylesheet.
Basically, CSS --> images --> javascript