-
Notifications
You must be signed in to change notification settings - Fork 1
API
Application Programming Interface:
The goal is design the interactive website that users can ask their questions and find the answers for them with different categories. It has divided into two main parts, Global Layout and Local Layout. Global Layout consists, Header, Footer, Body and left Side bar, till now we do not design any local layout but there are some local components like Question , addanswer, addquestion. Style.css was defined to give the style and format to all global and local components. The View is the information that is being presented to a user and it will normally be a web page.
Figure (1) illustrates the whole components.
Header:
Use absolute url as href attrbute inside the view pages which this url includes the path of css file
<link rel="stylesheet" href="<?php echo base_url('css/style.css');?>"
home:
Every thing that was written inside this div tag it will appear on the sidebar of the all pages.
<div id="leftnav"\>
Use the define form, from css file. <form class="myform" name:"sign in">
The class selector "submit" is used to specify a style for a group of elements and button "Login" and "Create New Account" give their attribute from this class
<p class="submit"> <input type="submit" value="Login" /></p>
<p class="submit"><input type="submit" value="Create New Account"></P>
Every thing that is written inside this tag it will appear on the main body of the pages so mange and manipulate the pages would be easy
<div id="body">
<p> </p>
</div>
addquestion:
<?php echo validation_errors(); ?>
<?php echo form_open('index.php/view/createQuestion') ?>
This is
input style="background-color:lightblue" type="submit" name="submit" value="Ask Question" />
addanswer:
<?php echo validation_errors(); ?>
<?php echo form_open('index.php/view/createAnswer') ?>
This is
<input style="background-color:lightblue" type="submit" name="submit" value="Ask Question" />
question:
Every thing that was written inside this div tag it will appear on the sidebar of the all pages.
The class selector "title" is used to specify a style for a group of elements and input type "title" give their attribute from this class
<p class="title"><label for="Title">Title:</label><input type="text" name="title" value="" /> </p>
The class selector "description" is used to specify a style for a group of elements and text are "description" give their attribute from this class
<p class="description"><label for="Description">Description:</label><textarea name="description"> </p>
The class selector "submit" is used to specify a style for a group of elements and button "submit" give their attribute from this class
<p class="submit">
<input type="submit" value="Submit" /> </p>
Use absolute url as href attrbute inside the view pages which this url includes the path of php file
<?php echo base_url('index.php/pages/view/about'); ?>
Footer:
style and test :
These files contains design and style for forms, select box, label, submit, body, fieldset and etc. which were brought some of them as example
.searchbox_submit {
border: 0px;
background-color: transparent;
position: absolute;
top: 40px;
right: 50px;
width: 32px;
height: 28px;
}
This class selector is used to specify a style for a group of elements. This allows you to set a particular style for many HTML elements with the same class. with the help of this class we have define the font, background, pad and border for input, text are and select elements.
.input, textarea ,select{
padding: 5px;
border: solid 1px #E5E5E5;
outline: 0;
font: normal 16px/100% Arial,Verdana, Tahoma,serif, sans-serif;
width: 170px;
background: #FFFFFF;
}
headerbg is id selector which is used to specify a style for a single, unique element header and it defines font, background,pad and position of it .
#headerbg {
font: 20px verenda, serif;
position: absolute;
top: 0px;
width: 1200px;
background: #0000FF;
padding: 30px;
}
