The example I posted in the other thread I linked to works really well and is very clean in my opinion. One image for the bottom borders, one image for the top borders (or combine them, whatever you want). 9/10 times you will have some box (div "sidebar") with something else in it (h2, p, ul, etc ) so those two elements are already in your markup. No need for any extra element. Only thing you'd have to do is make the image and write the 2 rules in the css.
Of course, when the box is not fixed width you'll need some more anchors.
IE6 box height, showing extra pixels
Moderator: General Moderators
- daedalus__
- DevNet Resident
- Posts: 1925
- Joined: Thu Feb 09, 2006 4:52 pm
Copy and paste is about as easy as it gets, imo. roflJcart wrote:I don't see using javascript a bad thing in this case, if it simplifies things. Javascript is used to enhanced features, if the user chooses to ignore these "enhancements" so be it.
I use a lot of javascript but not where it is unnecessary.Jcart wrote:I take it you never use javascript then? I would rather serve 97/100 people with javascript enabled anywaysWhen you figure out how to force users to enable javascript, let me know!
I've used sliding doors for navigational tabs a couple of times. However, I'll end up using the rounded corners in several different pages with different width.Kieran Huggins wrote:if you have fixed widths, you could use a variation on the "sliding doors" method - google it, it was on alistapart a few years back
At first I started doing like matthijs said, one image for the bottom borders, one image for the top borders, but it would end up being hell to maintain.
By using just one image for all the four corners, and just use background-position, the corner radius/color could be more easily maintained.
Now however, that I've seen the "css / divs without images"-aproach, I'm interested in going that way. Easily changing colors without having to load up photoshop to make another corner image sure would be nice. And reusable. For static pages where javascript is loaded instantly I'd no doubt end up using Nifty Corners. At least during the startup phase where it's important to get a working example asap.
Think I'll create a serverside script to output the corners.