Home arrow JavaScript arrow Page 3 - Building the User Interface for a Web Site Indexing Application with Prototype
JAVASCRIPT

Building the User Interface for a Web Site Indexing Application with Prototype


The Prototype JavaScript library makes it easy to perform certain JavaScript tasks. In this series of three articles, you will learn how to use the Prototype library to create an AJAX-powered application for handling the data for an index of web sites. This article, the first in the series, shows you how to create the user interface.

Author Info:
By: Alejandro Gervasio
Rating: 5 stars5 stars5 stars5 stars5 stars / 1
February 20, 2007
TABLE OF CONTENTS:
  1. · Building the User Interface for a Web Site Indexing Application with Prototype
  2. · Getting started: defining the layout of the elements that integrate the front-end
  3. · Defining the look and feel of the web site indexing application: creating a few simple CSS styles
  4. · Completing the front-end of the application: Putting the CSS styles and structural markup together

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Building the User Interface for a Web Site Indexing Application with Prototype - Defining the look and feel of the web site indexing application: creating a few simple CSS styles
(Page 3 of 4 )

In order to achieve the visual appearance that was shown in the two screen shots in the previous section, I'm going to define some straightforward CSS styles. As you may guess, these styles will be attached later on to the corresponding structural markup that integrates this web site indexing application.

Since this topic bears little discussion, please have a look at the following set of CSS rules, which logically are aimed at defining the look and feel of the program in question. Here they are:

<style type="text/css">
body{
 
padding: 0;
 
margin: 0;
 
background: #fff;
}

h1{
  width: 550px;
  padding: 10px;
  background: #ccf;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 10px;
  font: bold 22px Arial, Helvetica, sans-serif;
  color: #000;
  text-align: center;
  border: 1px solid #999;
}

#sitecontainer{
  width: 550px;
  height: 400px;
  background: #ccf;
  padding: 10px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 10px;
  border: 1px solid #999;
  overflow: auto;
}

#sitecontainer p{
  font: normal 11px Verdana, Arial, Helvetica, sans-serif;
  color: #000;
}

#sitecontainer a:link,#sitecontainer a:visited{
  font: bold 11px Verdana, Arial, Helvetica, sans-serif;
  color: #00f;
  text-decoration: underline;
}

#sitecontainer a:hover{
  color: #c30;
}

#formcontainer{
  width: 550px;
  height: 300px;
  background: #ccf;
  padding: 10px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid #999;
}

#formcontainer p{
  text-align: right;
  margin-right: 100px;
  font: bold 11px Verdana, Arial, Helvetica, sans-serif;
  color: #000;
}

.inputbox{
  width: 300px;
  padding: 2px;
  background: #eee;
  font: normal 11px Verdana, Arial, Helvetica, sans-serif;
  color: #000;
  border: 1px solid #999;
}

.submitbox{
  font: normal 11px Verdana, Arial, Helvetica, sans-serif;
  color: #000;
  padding: 2px;
}

textarea{
  width: 300px;
  height: 150px;
  padding: 2px;
  background: #eee;
  font: normal 11px Verdana, Arial, Helvetica, sans- serif;
  color: #000;
  border: 1px solid #999;
}

</style>

As shown above, I defined a few simple CSS styles to improve the visual appearance of each element that composes the front-end of this web site indexing application. In particular, I created not only the layout for the all the containing DIVs that are part of the user interface, but also styled some additional elements, such as text areas and form buttons, paragraphs and links, and <h1> headers.

Logically, at this point you shouldn't have major problems understanding how the previous CSS styles were created, since they're very easy to follow. Therefore, and keeping in mind that defining the look and feel that corresponds to this application is a straightforward process that can be performed with minor efforts,  let's move forward and see how all the CSS rules that were created previously can be annexed to the pertinent structural markup. Sounds pretty logical, right?

To learn how this will be done, please click on the link that appears below and keep reading.


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Tutorials for Beginners
- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 2 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials