How To Create Simple Horizontal Navigation Bar From CSS
Posted: 10 Sep 2010 05:51 AM PDT
Though there are lots of tutorial about Horizontal listings, I founds lots of beginners having problem in understanding the mess of extra CSS codes added in it. There are several methods to achieve horizontal navigations.
One of them can be simply achieved by placing the sequence of links in a single line and styling it with CSS. Let’s see how to do this.
First of all, lets create a simple links arranged in a same horizontal line.
Now when you save and load it in browser, it will look similar to the image below:
If you are satisfied with just these links in single line, then it is ok you can end the tutorial right here. Else if you want the horizontal navigation links like in Hackspc.com, you’ll have to follow up to the end of this tutorial.
We cannot easily create background effect in without using CSS. So, we’ll need to style it with proper CSS.
Now let’s apply some CSS to the link. But before applying any CSS to the tag, you must note that it must be specific to the horizontal links only. Otherwise, your other content links will also look same as the navigation links. So, let’s make it unique by keeping it inside a div with id menu.
Now we’ll define the compound CSS to so that the CSS style only applies to the link inside the MENU id.
Now the above CSS will be applied to all the tags inside
How To Write Your First PHP Script
Posted: 10 Sep 2010 05:26 AM PDT
You want to learn how to write PHP scripts but don’t know where to start from? In this tutorial I’ll show you all what you’ll need to write your first PHP script. It is a lot easier to get started with than you might think.
Why Use PHP?
PHP is a powerful tool for making dynamic and interactive Web pages.. By learning just a few simple functions, you are able to do a lot of things with your website. And once you know the basics, there are a wealth of scripts available on the internet that you only need to tweak a little to fit your needs
What you’ll need?
To start writing PHP scripts, you need access to a Web server running PHP.There are 2 options: to run php script on you web host or to run PHP script on your own computer .I recommend you second option to run PHP scripts locally, download XAMP and notepad++.
- Run php script on you web host, if you have already your web host just upload php scripts on web server via FTP or file manager, if not then check this link Best Free Web Hosting, there you’ll find list of the best free web hosting, by my opinion. I recommend 000WebHost , all you need to do is register and you are ready to write you php scripts. The advantage of this approach is that you don’t have to install anything; the disadvantage is that it’s slower to write and test your script
- Run PHP script on your own computer. There are many way to run php scripts locally , by my opinion the easiest way is to install a complete package like XAMPP. XAMPP is a great piece of software for a development machine, I highly recommend it. Be sure to have not start up when Windows starts, you can always turn it on manually when you need it. Here are detailed instruction How To Install XAMPP
- Download text editor. To write PHP code you’ll need text editor, I recommend to download Notepad++ , here is download link
First PHP Script- Hello World.php
Every php script begins . Below is example of simplest Hello World php script. PHP command echo is a means of outputting text to the web browser.
How to upload php scripts on XAMPP?
Install XAMPP and launch it. Open text editor as notepad ++ type your code and save as filename.php.
Go to folder where you installed XAMMP, default it’s C:/xampp , there you’ll find folder called htdocs , save you script myFirstScript.php to htdocs
Launch your web browser and type http://localhost/
myFirstScript.php
How to Upload PHP Scripts on 000webhost.com
Login to your 000webhost.com acc , open File manager
Go to folder public_html and click upload, browse your php script
Launch web browser and type http://yourDomainName.com/
YourScriptName.php
Saturday, December 4, 2010
>> How To Create Simple Horizontal Navigation Bar From CSS >> How To Write Your First PHP Script
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment