CSS3 question

I must first say I have not tried this but looks like you could do this with jQuery, here is the link
 
Ok, I get what you want to achieve. AFAIK, that's not possible with only CSS effects / filters applied to a single element. I guess you'd have to add extra DIVs to get that effect...
 
Ok, I get what you want to achieve. AFAIK, that's not possible with only CSS effects / filters applied to a single element. I guess you'd have to add extra DIVs to get that effect...

Looks the only way, but not so "elegant". Think I'll just go with a background image.
 
I guess I could use a div with a linear gradient, then place a smaller div on top for the white block.
 
...or go with the background image for now. Would be the most widely supported and quickest to pull off. :p
 
I tried that PIE js thingy to enable CSS3 for IE on a site a couple of weeks ago, but it didn't work, just made the elements disappear. There was a morass of other js on that site so there could have been a conflict.

Anyway, *crops background image* in PS.
 
Last edited:
I tried that PIE js thingy to enable CSS3 for IE on a site a couple of weeks ago, but it didn't work, just made the elements disappear. There was a morass of other js on that site so there could have been a conflict.

Anyway, *crops background image* in PS.

Hahaha! :D
 
You can also maybe use border-image, if you want to go the border route. http://www.css3.info/preview/border-image/ and http://css-tricks.com/understanding-border-image/
But the browser support for border-image is still extremely minimal.

If you want to go the background route, then you can use this tool to generate gradients: http://www.colorzilla.com/gradient-editor/

If you go the background route, you can just create one div that is behind the main container. Then you just make the padding of the main container 2px.

Code:
.backcontainer {
background: url(image/gradient.png) no-repeat top center #fff;
padding:2px;
}
.container {
background:#fff;
margin:0;
}

Well I think you will get the point. That way, you only need one parent div and one background image and not divs for every side.
 
Last edited:
Well I think you will get the point. That way, you only need one parent div and one background image and not divs for every side.

Ya, that's what was getting at here:
I guess I could use a div with a linear gradient, then place a smaller div on top for the white block.

That border-image looks interesting.
 
Top
Sign up to the MyBroadband newsletter
X