Border radius – css simple example

Hello, here is very simple example of how to use border radius in css style.

When you are using border-radius property you can add only one value or four values.

For example when you will use only one value of parameter:

<div style=”border-radius:10px;border:1px solid #000;”></div>

You will get a div with all rounded corners by 10 px.

If you will use all four values of border-radius parameter:

<div style=”border-radius:10px 20px 30px 40px;border:1px solid #000;”></div>

You will get also a div with all rounded corners but with different radius. The way how to use four values is explained below.

“border-radius:left-top right-top right-bottom left-bottom”

border radius

How to create a virtualhost on Wamp server – Windows

Hello, if you want to create a virtualhost on your local machine (under Windows) using WAMP server and run your local php script/webpage under domain http://virtual1.localhost, here is an example and steps what you should do (an installation folder of WAMP server in this case is d:\wamp, the folder with your new app for example will be D:\wamp\www\newfolder1):

1. Open in text editor file named httpd.conf ( d:\wamp\bin\apache\apache2.4.9\conf)

2. Write following lines in file httpd.conf

<VirtualHost virtual1.localhost>
ServerName virtual1.localhost
DocumentRoot D:\wamp\www\newfolder1
<Directory D:\wamp\www\newfolder1>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all

3. Inf you have problems with VirtualHost under Chrome or Opera, check the lines where are:

Listen [::0]:80

and try to replace it into:

#Listen [::0]:80

and add another virtualhost for localhost

<VirtualHost localhost>
ServerName localhost
DocumentRoot d:\wamp\www
<Directory d:\wamp\www>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all

4. Save the file changes.

5. Open in text editor (as administrator) file named “hosts” (C:\Windows\System32\drivers\etc)

6. Write following lines in file “hosts”: virtual1.localhost

7. Save the file changes.

8. Restart Apache on WAMP server.

Simple example of html5 form with validation

Hello, I would like to show, a simple example of form written in html5, with fields validation using default html5 attributes.

<!DOCTYPE html>
<meta charset=”utf-8″ />
<title>Form 1</title>

<input type=”text” name=”first_name” required placeholder=”First name” ><br>

<input type=”email” name=”e_mail” required placeholder=”Your e-mail” ><br>

<textarea name=”message” required placeholder=”Message”></textarea><br>

Accept regulations <input type=”checkbox” name=”regulations” value=”1″ required ><br>

<input type=”submit” value=”Send Form” >