CSS Heart – A web designer way of wishing Valentine’s Day…

CSS Heart – A web designer way of wishing Valentine’s Day…
CSS art - Valentine's day card created purely using css and html - download free

Personally, I have never celebrated valentine’s day in my life, in-fact I am completely against the idea of reserving days for our dear ones. Be it valentine’s day, Mother’s day or Friendship day, I just can’t understand the logic of waiting for a particular day to celebrate love or express gratitude for my loved ones. My affection will always be there and my dear ones will know it all the time. Besides, at least in India Valentine’s Day is nothing more than a marketing gimmick, it is hyped by marketing folks to sell their products.

Similarly I am also gonna use this day for the first time just to market my blog 😉

Here in this day I am expressing here, my whole hearted love and affection towards such a wonderful web tool called CSS. That too in a different way, with a Pure CSS Valenties Day Card.

This Valentine’s Day Card is designed purely using CSS & HTML. No images, fonts or symbols here, simply CSS with plain DIVs and Classes, even the text ‘I LOVE CSS’. Go ahead and check…

Browser Compatibility: I have checked it in Firefox 3.5 and Chrome 4.0 and it’s working fine in both the browsers. There are some rendering issues in IE-7 and Opera 9.02. I am not sure about Safari.

[ad#ad-3]

CSS Heart – LIVE PREVIEW

Sample HTML Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<div id="container">
	<div class="hrt-lft"></div>
	<div class="hrt-rgt"></div>
	<div class="bot"></div>
 
	<div class="arw1"></div>
	<div class="arw2"></div>
	<div class="pointer"></div>
	<div class="pointer2"></div>
	<div class="pointer3"></div>
 
	<div class="shade1"></div>
	<div class="shade2"></div>
	<div class="shade4"></div>
	<div class="shade5"></div>
 
	<div class="msg-holder">
		<div class="i"></div>
		<div class="l">
			<div></div>
		</div>
		<div class="o">
			<div></div>
		</div>
		<div class="v"></div>
		<div class="v2"></div>
		<div class="v3"></div>
		<div class="e">
			<div class="e2"></div>
			<div class="e3"></div>
		</div>
		<div class="c">
			<div></div>
		</div>
		<div class="s">
			<div class="s2"></div>
			<div class="s3"></div>
		</div>
		<div class="ss">
			<div class="ss2"></div>
			<div class="ss3"></div>
		</div>
	</div>
</div>


[ad#ad-1]

The CSS

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
#container {
height:500px;
margin:0 auto;
position:relative;
width:500px;
z-index:1;
}
.hrt-lft {
-moz-border-radius:150px 150px 0 0;
-webkit-border-radius:150px 150px 0 0;
background-color:#FF0000;
float:left;
height:90px;
left:85px;
position:absolute;
width:180px;
}
.hrt-rgt {
-moz-border-radius:150px 150px 0 0;
-webkit-border-radius:150px 150px 0 0;
background-color:#FF0000;
height:90px;
position:absolute;
right:85px;
width:180px;
}
.bot {
border-left:165px solid transparent;
border-right:165px solid transparent;
border-top:165px solid #FF0000;
font-size:0;
left:85px;
line-height:0;
position:absolute;
top:90px;
width:0;
z-index:1000;
}
.arw1 {
background-color:#333333;
height:10px;
left:20px;
position:absolute;
top:80px;
width:195px;
z-index:1000;
}
.arw2 {
background-color:#333333;
height:10px;
position:absolute;
right:20px;
top:80px;
width:66px;
z-index:1000;
}
.pointer {
border-color:transparent transparent transparent #000000;
border-style:solid;
border-width:20px;
font-size:0;
line-height:0;
position:absolute;
right:-20px;
top:64px;
width:0;
z-index:1000;
}
.pointer2 {
border-color:#000000 #000000 #000000 transparent;
border-style:solid;
border-width:20px;
font-size:0;
left:0;
line-height:0;
position:absolute;
top:65px;
width:0;
z-index:200;
}
.pointer3 {
border-color:#FFFFFF transparent;
border-style:solid;
border-width:20px;
font-size:0;
left:20px;
line-height:0;
position:absolute;
top:65px;
width:0;
z-index:300;
}
.shade1 {
-moz-border-radius:100px;
-webkit-border-radius:100px;
background-color:#FF9900;
height:100px;
position:absolute;
right:120px;
top:25px;
width:100px;
z-index:1200;
}
.shade2 {
-moz-border-radius:100px;
-webkit-border-radius:100px;
background-color:#FF0000;
height:120px;
position:absolute;
right:115px;
top:35px;
width:120px;
z-index:1300;
}
.shade3 {
-moz-border-radius:200px 300px 200px 350px;
-webkit-border-radius:200px 300px 200px 350px;
background-color:#FF0000;
height:170px;
position:absolute;
right:60px;
top:102px;
width:170px;
z-index:1300;
}
.shade4 {
border-color:#FF9900 #FF9900 #FF9900 transparent;
border-style:solid;
border-width:0 11px 30px 40px;
font-size:0;
line-height:0;
position:absolute;
right:200px;
top:170px;
width:0;
z-index:1600;
}
.shade5 {
border-color:transparent #FF0000;
border-style:solid;
border-width:40px 37px 0 0;
font-size:0;
line-height:0;
position:absolute;
right:195px;
top:160px;
width:0;
z-index:1700;
}
.msg-holder
{
-moz-box-shadow:0 0 12px #D2D2D1;
-webkit-box-shadow:0 0 12px #D2D2D1;
background-color:#EEEEEE;
border:1px solid #D2D2D2;
height:50px;
margin:0 auto;
padding:10px;
position:relative;
top:300px;
width:90%;
}
.c {
-moz-border-radius:15px 0 0 15px;
-webkit-border-radius:15px 0 0 15px;
background-color:#333333;
height:45px;
position:absolute;
right:140px;
width:45px;
}
.c div {
-moz-border-radius:10px 4px 4px 10px;
-webkit-border-radius:10px 4px 4px 10px;
background-color:#eeeeee;
height:22px;
position:relative;
right:-20px;
top:11px;
width:25px;
}
.i {
background-color:#333333;
height:45px;
position:absolute;
left:20px;
width:17px;
}
.l {
background-color:#333333;
height:45px;
position:absolute;
left:65px;
width:35px;
}
.l div {
-moz-border-radius:2px 0 3px 0;
-webkit-border-radius:2px 0 3px 0;
background-color:#eeeeee;
height:33px;
left:15px;
position:relative;
top:0;
width:20px;
}
.o {
-moz-border-radius:10px;
-webkit-border-radius:10px;
background-color:#333333;
height:45px;
left:105px;
position:absolute;
width:45px;
}
.o div {
-moz-border-radius:0 3px 0 3px;
-webkit-border-radius:0 3px 0 3px;
background-color:#eeeeee;
height:27px;
left:19px;
position:relative;
top:9px;
width:8px;
}
.v {
border-color:#333333 transparent transparent;
border-style:solid;
border-width:60px 30px;
font-size:0;
left:152px;
line-height:0;
position:absolute;
top:10px;
width:0;
z-index:300;
}
.v2 {
background-color:#eeeeee;
bottom:0;
height:15px;
left:165px;
position:absolute;
width:30px;
z-index:1000;
}
.v3 {
border-color:#eeeeee transparent transparent;
border-style:solid;
border-width:60px 25px;
clip:rect(30px, 60px, 200px, 0px);
font-size:0;
left:158px;
line-height:0;
position:absolute;
top:-25px;
width:0;
z-index:300;
}
.e {
background-color:#333333;
height:45px;
left:217px;
position:absolute;
width:43px;
}
.e2 {
-moz-border-radius:0 0 2px 0;
-webkit-border-radius:0 0 2px 0;
background-color:#eeeeee;
height:6px;
left:15px;
position:relative;
top:27px;
width:28px;
}
.e3 {
-moz-border-radius:0 2px 0 0;
-webkit-border-radius:0 2px 0 0;
background-color:#eeeeee;
height:5px;
left:15px;
position:relative;
top:4px;
width:28px;
}
.s {
-moz-border-radius:9px 0 9px 0;
-webkit-border-radius:9px 0 9px 0;
background-color:#333333;
height:45px;
position:absolute;
right:85px;
width:45px;
}
.s2 {
-moz-border-radius:0 3px 3px 2px;
-webkit-border-radius:0 3px 3px 2px;
background-color:#eeeeee;
height:6px;
position:relative;
right:0;
top:27px;
width:25px;
}
.s3 {
-moz-border-radius:3px 2px 0 3px;
-webkit-border-radius:3px 2px 0 3px;
background-color:#eeeeee;
height:6px;
position:relative;
right:-20px;
top:5px;
width:25px;
}
.ss {
-moz-border-radius:9px 0 9px 0;
-webkit-border-radius:9px 0 9px 0;
background-color:#333333;
height:45px;
position:absolute;
right:30px;
width:45px;
}
.ss2 {
-moz-border-radius:0 3px 3px 2px;
-webkit-border-radius:0 3px 3px 2px;
background-color:#eeeeee;
height:6px;
position:relative;
right:0;
top:27px;
width:25px;
}
.ss3 {
-moz-border-radius:3px 2px 0 3px;
-webkit-border-radius:3px 2px 0 3px;
background-color:#eeeeee;
height:6px;
position:relative;
right:-20px;
top:5px;
width:25px;
}

[ad#ad-3]

Download CSS Heart

HTML & CSS Code
[download id=”5″]

You can use these codes for personal and commercial projects at free of charge. What I only expect in return is your comments and backlinks, if you like it. You are not allowed to sell or redistribute the code anywhere else. If you like to share CSS Heart please link to this article.
Do not provide the direct download link nor upload these menus onto other servers for your own share, without my permission. If you want to spread the words, just link to this article.

Creative Commons License
CSS Heart – Pure CSS Valenties Day Card – CSS Art by Deepu Balan is licensed under a Creative Commons Attribution 2.5 India License. Based on a work at deepubalan.com.

About The Author

13 thoughts on “CSS Heart – A web designer way of wishing Valentine’s Day…

  1. woot! This is cool! Hope to see more tutorials from you. This is very helpful especially to those who are just starting with their CSS.

    I love CSS!

  2. This is what I call, an awesome code. You’ve worked hard to design the heart, Deepu.

    Not only have you created something unique, but also explained it clearly so that everyone can understand in a jiffy. I am eagerly waiting for more of such articles about CSS and its possibilities.

  3. Pingback: [User Link:CSS Heart – A web designer way of wishing Valentine’s Day…] | Tips for Designers and Developers | tripwire magazine
  4. How ingeniously original ! 😀 I believe Picasso would have loved it as it is quite reflective of the ” cubist ” style [ which Picasso was famous for ] ; hmmm..now I bet he would have loved it even more if you would have done it in BLUE ! ( since Picasso never had a chance to go into the Red period / phase of his work ) – his last period was the Blue Period . Well, now there is always next year 😉 😀 **There is nothing wrong with setting aside a Universal Day of Love , think of it as …Christmas where everyone is nice to each other 😀

    Kudos for your hard work here D.

Leave a Reply

Your email address will not be published. Required fields are marked *