crf_h0m3r — 2012-11-09T12:55:19-05:00 — #1
Hi fellas, how to create something like this below, using only one div and elements CSS3?
edit: It is as if they were three boxes on top of one another, but using only one div.
paulob — 2012-11-09T16:38:39-05:00 — #2
If its just for a pretty effect then you can do it like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
border:20px solid lightgreen;
outline: 20px solid brown;
border: 20px solid brown;
Or you could use box-shadow for multiple borders.
crf_h0m3r — 2012-11-09T17:56:05-05:00 — #3
But in this case, you're using two divs test1 and test2, isn't possible create using only one?
stomme_poes — 2012-11-09T18:50:42-05:00 — #4
It is one div, Paul has two to show you two possible techniques. There should be two boxes showing up in the test, both doing what you want but in different ways. The second way won't work in IE7.
crf_h0m3r — 2012-11-09T18:58:08-05:00 — #5
Oh, sorry! Now I understand why he put two squares and my figure only shows one. ashamed
paulob — 2012-11-10T04:21:04-05:00 — #6
Thanks for explaining Mallory