They still use css in the tables to supply the background images.
The images are all in one sprite and are just placed using the background-position to manipulate which image is placed where and also to allow different coloured borders etc.
It can be done without tables but will probably still need the same amount of code as a table because you always need hooks to hang the corners on.
I don’t want to do it just using CSS, I don’t mind using images. What’s the best way of adding rounded corners to an element (i.e. <div>) using a single image containing corners?
Only works in Firefox, Safari and Chrome currently but the others will catch up and implement it soon. If rounded corners aren’t a deal breaker for you - The browsers that support them can have the extra 4 pieces of flare.
I know that I didin’t mention it because of lack of IE support, even IE8. The total IE takes up majority of hte market (over 50%) so…I didn’t view it as an option. Perhaps once IE takes support I will mention it.
PS-Opera doesn’t support it as well. IE9 won’t be released for a while and Opera hasn’t added them thus of yet (must be waiting for CR I’m guessing)
Make sure you include a non-prefixed version of the property too.
css-background became a CR on 17th Dec last year. Presto 2.3 - the next version of Operas layout engine - supports ‘border-radius’, amongst other things.
css-background became a CR on 17th Dec last year. Presto 2.3 - the next version of Operas layout engine - supports ‘border-radius’, amongst other things.[/QUOTE]
Ah I hadn’t kept up with that from W3…too much to read in such little time…thanks for the info James
I choose not to add stuff that isn’t yet used. When the time comes I will search and replace.
Sweeet.
The total IE takes up majority of hte market (over 50%) so…I didn’t view it as an option
I understand that argument, and for some cases it might be valid - but I’m bored of writing rounded corner boxes to be honest - I’m quite ok with the corners not being a mandatory design requirement.
After using it for a few months now I can’t imagine going back to the older methods. Ignorance Is Bliss
Yep. Isn’t that a reason for having the proprietary properties/values, to test not just the implementation, but the understanding of the spec? In discussion at Bugzilla, whether to emulate the webkit ‘variants’ was brought up;
"> Also, I’m assuming there’s no need to support the -webkit- variant of these
> properties.
Absolutely right, keep to the standard, it’s complex enough without introducing
variants."
It would have been much better were IE and Opera to have worked on this kind of thing out in the open so that all may discuss with, and learn from the others.
This vague spec reminds me of the problems with {display: run-in;} which Opera and Safari have implemented; poorly. It would have been much better to have used a proprietary property value, as many of the bugs in present implementations will cause breakage when fixed.