I am in the process of dicing and slicing a psd layout from a designer. The design is based on the 960 grid system and consists of multiple boxes (a 960px box for the top menu, 2 460px boxes for the 2 content areas, a 220pixel and a 720 pixel for another content setup option etc). All these boxes are based on a solid background color (body) but they all have rounded corners and a aprox border of 10pixel all the way around which are gradient.
I am contemplating on what would be the best route to take here, html wise, while keeping in mind that it should ofcourse validate, nice semantics etc.
Any ideas/input?
I am contemplating on what would be the best route to take here, html wise, while keeping in mind that it should ofcourse validate, nice semantics etc.
The best route to take here would be using pure CSS3 to add the rounded corners and gradients.
Benefits:
Downsides:
It’s really up to you.
If you want your site to look exactly the same in every browser, CSS3 is not an option — you’ll have to rely on hard-to-maintain images and bloated markup.
However, if you don’t mind giving users of older browsers a slightly different but still nice design, CSS3 definitely is the way to go.
‘CSS3’ gradients:
CSS3 rounded corners:
This ain't going to work flawlessly in all webbrowsers from IE6 and up with only CSS. You'll need to grab JavaScript to get it to work in all browsers. There are jQuery plugins which can round corners on the fly, working on all webbrowsers, without any additional images or CSS. I've had good experiences with this jQuery Corner plugin.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With