php-mysql tutorial

Designed By NISHANT GUPTA

  • Home
  • PHP
  • HTML
  • CSS
  • JavaScript
  • JQuery
  • Contact-us
  • Learn HTML

    • Introduction of HTML
    • Image Handling in HTML
    • List Handling in HTML
    • Font Handling in HTML
    • Table Handling in HTML
    • Form Handling in HTML
  • Learn CSS

    • Introduction of CSS
    • Styling Background in CSS
    • Styling Text in CSS
    • Styling Font in CSS
    • Styling Link in CSS
    • Styling List in CSS
    • Styling Table in CSS
    • Styling Div in CSS
    • Styling Span in CSS
    • Positioning in CSS
    • Display in CSS
  • Learn JavaScript

    • Introduction of JavaScript
    • Data Type in JavaScript
    • Variable in JavaScript
    • Oprator in JavaScript
    • Cond. Statement in JavaScript
    • Loop in JavaScript
    • Array in JavaScript
    • Function in JavaScript
    • Date in JavaScript
    • String in JavaScript
    • DOM in JavaScript
    • Event Handling in JavaScript
    • Form Handling in JavaScript
  • Learn PHP-MYSQL

    • Introduction of PHP
    • Decision Control in PHP
    • Loop in PHP
    • Array in PHP
    • Function in PHP
    • Form Handling in PHP
    • File Inclusion in PHP

Positioning in CSS

What Is Positioning

Positioning means placing the elements at precise location in the browser.

But before we can understand Positioning we need to understand 3 important terms:

  1. Box Model
  2. Padding
  3. Margin

The CSS Box Model

  • To understand positioning in CSS we must first understand the box model.
  • For display purposes, every element in a document is considered to be a rectangular box which has a content area surrounded by padding, a border and margins.

Box Model Terms

  1. Content:  The content. This can be text, images or anything else.
  2. Padding:  The space between the contents and the frame.
  3. Border:  The frame in the defined thickness.
  4. Margin:  The space between the frame and the next item.

Box Types

  1. There are two basic types of boxes, block and inline
  2. Block boxes are generated by elements such as P, DIV or TABLE.
  3. Inline boxes are generated by tags such as B, I or SPAN and actual content like text and images.

Handling Margin

  • The margin property is used to declare the margin between HTML element and those elements outside of it.
  • The margin can be set for the top, left,right, and bottom of the given element.

Margin values

There are 3 choices for margin values:
  1. length
  2. percentage
  3. auto
Syntax
margin-top: some value; 
margin-left: some value;
margin-right: some value;
margin-bottom: some value;

Advertisements

 

©  2014 All Rights Reserved  •  Design by >Nishant Gupta.

Privacy Policy • Terms of Use