Thursday, 27 November 2014

CSS Flower

CSS Flower
Let flowers bloom with CSS!

The basic structure of the petals are made with 10 div elements. The unique shape of a petal is created by CSS border-top-left-radius and border-bottom-right-radius. The greater the value the rounder the corner gets.

HTML & CSS Code

Wednesday, 26 November 2014

Sweeten Your Text With CSS: Chocolate

Sweeten Your Text With CSS: Chocolate
Chocolate
I love chocolate! So why not making a chocolate like logo? In the example above, I have used 3 different colors: sienna (#D2691E), maroon (#800000) for the highlights and the shadows and chocolate (#D2691E) for the whole bar. It should look like a chocolate bar so I have used border-style:outset in the CSS code. The highlight and shadows of the letters are made with the text-shadow property. After working on this design for 30min I have a graving for chocolate!

CSS & HTML Code

Tuesday, 25 November 2014

CSS Flex: Making A Sunblock

CSS Flex: Making A Sunblock
Here I have designed a window sun block.

The CSS display:flex property makes it super easy to create same sized HTML div elements with different colors.

HTML

The "box" div element contains several div elements describing the color of each element with style="background-color:color".

CSS

The size of the div elements is defined by flex:1. The prefix -webkit- and -ms- is necessary if you want to display it in Safari and Internet Explorer. Don't forget to write display:flex for the "box" div element.

CSS&HTML Code

.

Monday, 24 November 2014

Jeans Style Logo With CSS

Jeans Style Logo With CSS
The border-style allows you to choose different border styles. In the designs above I have used the border-style:dashed to create a label which looks like a stitched one. For details, have a look at the code.


HTML & CSS Code

Friday, 21 November 2014

What Time Is It?

Pink & Black Clock With jQuery

Here, I've created a clock with JavaScript.
First of all, the clock should start working the page has been loaded so we use the onload event. We call the function "clock()".

HTML

To connect the event with the function you have to write onload="clock()" in the body element of the HTML code. The onload event is only valid in the body element. For example, if you put onload in the button element it will do nothing.

JavaScript

We want to get the hours, minutes and seconds so we use the following methods: getHours(), getMinutes() and getSeconds(). The Date() object makes it possible that the actual time is shown. The last line of the code put the hours, minutes and seconds with + together. You have to put something between the variables to make sure everything is displayed; this time I've put colons in between.



HTML Code

CSS Code

JavaScript Code

Thursday, 20 November 2014

Red Neon Sign With CSS

Red Neon Sign With CSS
T-Bone


I wanted to try other colors for a neon style sign and I though red would look nice. So I've used red for text-shadow in CSS. Here is its structure:

text-shadow {y px x px zpx colour;}

The first px value shifts the text horizontally, the second vertically and the last value defines the degree of the blur.


CSS&HTML Code

Wednesday, 19 November 2014

Retro Telly With CSS

tv designed with css
Retro Telly With CSS
This TV includes 6 div elements which display the TV outer box ("telly_frame"), the screen ("screen"), two antennas ("antenna_left", "antenna_right") and the two buttons on the left ("upper_button", "downside_button"). All div elements are put inside the outer box to position the rest of the elements absolute to this element.

The screen, the buttons are relative to the box which is described with the property position:absolute. The metallic effect of the buttons is created with the CSS background:linear-gradient property and don't forget to put the prefixes -o-, -moz- and -webkit- to show it in all browsers.


CSS & HTML CODE