SlideShare a Scribd company logo
Slicing The Web
By: M. Aladdin Hemmat
August, 2008
slicing using tableless or DIV technique
➔Objective of this training:
Slicing The Web
1- To review the slicing techniques and when I’m talking about
Techniques, I’m talking about how to slice the design inside the
Graphic program.
2- To know how to convert in between the design to a coded
webpage.
2- To get a good knowledge of CSS with stress on Styles that is
used in slicing.
3- To troubleshoot any kind of webpage templates.
Slicing The Web
Designing Phase
“Photoshop”
Or the graphic program you are
using to make your design
Coding Phase
“HTML / XHTML”
The code of the webpage
Styling Phase
CSS
Cascading style sheets
✓ Design to HTML
✓ Design Tips that will be
very helpful at ‘DIV’ing or
slicing as general
✓ <DIV> Vs <Table>
✓ Does <Table> is that bad?!
✓ Necessary HTML tags
(incase of using <DIV>)
✓ Samples & Examples of
<Table> WebPages
✓ Samples & Examples of
<DIV> WebPages
✓ CSS Tags needed
✓ Alternative methods to
slice the page using CSS
✓ Samples & Examples
✓ How to troubleshoot CSS
problems during <DIV>ing
Slicing The Web
Slicing The Web
Design Phase
➔Design to HTML:
Slicing The Web
1- slicing techniques.
2- Using PhotoShop to Export the design as a webpage.
➔Design Tips that will be very helpful at ‘DIV’ing or slicing as general:
1- Optimize the spaces with solid colors, by using hex CSS code
instead of pictures.
Slicing The Web
2- use background image using CSS.
Slicing The Web
HTML Phase
➔<DIV> Vs <Table>:
Slicing The Web
Table Technique DIV Technique
1 Ease Easy and Intuitive Not quite easy
2 SEO Friendly Friendly
3 Flexibility less flexibility More flexible
4 CSS need Not often used Usually used or in most cases
5 Code weight More code weight Less code weight
6
Code
understanding
Easy to be understood Not quite easy to understood
7 How many Cells It has rows , column and therefore cells Just one cell per DIV
8 Maintainability Easy but take time Little complicated but efficient
9 Cell Float Cell can’t float in the page Cell can float in the page
➔<DIV> Vs <Table>:
Slicing The Web
According to HTML Structure and weight of the code:
➔Does <Table> is that bad ?!
Slicing The Web
NO
But why? tell me why I have to use <table> any more?
➔The rigidity of the structure.
➔The ease of understanding in some complicated structures.
!Of course these advantages are according to slicing point of view.
➔Necessary HTML tags (incase of using <DIV>):
Slicing The Web
<div>
-------------------
<span>
-------------------
<ul> <ol> <li>
-------------------
<br> <hr>
➔Necessary HTML tags (incase of using <DIV>):
Slicing The Web
<div>
Example <div id=“header” style=“color: #FFF;”></div>
<div class=“header” style=“color: #FFF;”></div>
Attributes (id ,class, style)
The <div> tag defines a division/section in a document.<div>
➔Necessary HTML tags (incase of using <DIV>):
Slicing The Web
<span>
Attributes (id ,class, style)
Example <span id=“header” style=“color: #FFF;”></span>
<span class=“header” style=“color: #FFF;”></span>
The <span> tag is used to group inline-elements in a document.<span>
➔Necessary HTML tags (incase of using <DIV>):
Slicing The Web
<dl> <dt> <dd>
Attributes (id ,class, style)
Example
<dl>

<dt> Coffee </dt> 

<dd> Black hot drink </dd> 

<dt> Milk </dt> 

<dd> White cold drink </dd> 

</dl>
The <dl> tag defines a definition list.<dl>
The <dt> tag defines the start of a term in a definition list.<dt>
The <dd> tag defines the description of a term in a definition list.<dd>
Coffee
Black hot drink
Milk
White cold drink
➔Necessary HTML tags (incase of using <DIV>):
Slicing The Web
<ul> <ol> <li>
The <ul> tag defines an unordered list.<ul>
The <ol> tag defines the start of an ordered list.<ol>
The <li> tag defines the start of a list item.
The <li> tag is used in both ordered (<ol>) and unordered lists (<ul>).<li>
➔Necessary HTML tags (incase of using <DIV>):
Slicing The Web
<ul> <ol> <li>
Example <ol>

<li>Coffee</li> 

<li>Tea</li> 

<ol/>
<<ul

<li>Coffee</li>

<li>Tea</li>

<ul/>
1. Coffee
2. Tea
• Coffee
• Tea
➔Necessary HTML tags (incase of using <DIV>):
Slicing The Web
<br> <hr>
The <br> tag inserts a single line break.
In HTML the <br> tag has no end tag, like this: <br>.
In XHTML the <br> tag must be properly closed, like this: <br />.
Attributes (id ,class, style)
Example
<hr class=“break” style=“color:#FFF;” /> @XHTML
<br class=“break” style=“color:#FFF;” /> @XHTML
The <hr> tag inserts a horizontal rule.
In HTML the <hr> tag has no end tag.
In XHTML the <hr> tag must be properly closed, like this: <hr />.
<hr>
<br>
➔Samples & Examples of <Table> WebPages:
Slicing The Web
➔Samples & Examples of <DIV> WebPages:
Slicing The Web
Slicing The Web
CSS Phase
➔CSS Tags needed:
Slicing The Web
Background:;
-------------------
Padding:;
-------------------
Margin:;
-------------------
Float:;
-------------------
Position:;
-------------------
Display:;
-------------------
Direction:;
➔CSS Tags needed:
Slicing The Web
Background:;
Background-color: #FFF;
Background-images: url( images/pic.jpg) ;
Background-position: center top ;
Background-repeat: repeat-x ;
Background-attachment: scroll ;
Background: #FFF url(images/pic.jpg) center top repeat scroll;
➔CSS Tags needed:
Slicing The Web
Padding:;
Padding-top: 30px;
Padding-left: 30px;
Padding-bottom: 30px;
Padding-right: 30px;
Padding: 10px 30px 10px 30px ;
Padding: 10% 30% 10% 30% ;
➔CSS Tags needed:
Slicing The Web
Margin:;
margin-top: 30px;
margin-left: 30px;
margin-bottom: 30px;
margin-right: 30px;
margin: 10px 30px 10px 30px ;
margin: 10% 30% 10% 30% ;
margin: -10px -30px -10px -30px ;
➔CSS Tags needed:
Slicing The Web
Float:;
Float:
Right
Left
➔CSS Tags needed:
Slicing The Web
Position:;
Position:
Relative;
Absolute;
Fixed;
Static;
Z-index:
+1;
0;
-1;
Z-index can be used to place an element "behind" another element.
➔CSS Tags needed:
Slicing The Web
Display:;
Display:
Block;
Inline;
None;
CSS Tags needed:
Slicing The Web
Direction:;
Direction:
ltr;
(left to right)
rtl;
(right to left)
➔Alternative methods to slice the page:
Slicing The Web
Using
<table>
Using
Float + Padding + Margin
Using
Float
Left column Right column
➔Alternative methods to slice the page:
Slicing The Web
1- Using <table> <table width="800" cellspacing="2" cellpadding="5" border="1">
<tr>
<td colspan="2">
<p>Lorem ipsum dolor sit amet,</p>
</td>
</tr>
<tr>
<td width="150">
<p>Lorem ipsum dolor sit amet,</p>
</td>
<td width="650" valign="top">
<p>Lorem ipsum dolor sit amet,</p>
</td>
</tr>
<tr>
<td colspan="2" valign="top">
<p>Lorem ipsum dolor sit amet,</p>
</td>
</tr>
</table>
In HTML
➔Alternative methods to slice the page:
Slicing The Web
2- Using “ float ”
<div class=“Header”>
<p> Lorem ipsum dolor sit amet, </p>
< div>
<div class=“left”>
<p> Lorem ipsum dolor sit amet, </p>
<div>
<div class=“right”>
<p> Lorem ipsum dolor sit amet, </p>
</ div>
<div class=“footer”>
<p> Lorem ipsum dolor sit amet, </p>
<div>
In HTML
➔Alternative methods to slice the page:
Slicing The Web
2- Using “ float ”
.header{ width: 800px ;
height: 100px ;
margin: 5px auto 5px auto ; }
.left{ width: 140px; <<<<<<<<<<<<<<<<<<<<<<
float: left;
margin: 5px 5px 5px 5px ; }
.right{ width:640px ; <<<<<<<<<<<<<<<<<<<<<<
float: right ;
margin: 5px 5px 5px 5px ; }
.footer{ width: 800px ;
height: 50px ;
margin: 5px auto 5px auto ;
clear: both ; }
In CSS
➔Alternative methods to slice the page:
Slicing The Web
3- Using “ float + padding + margin ” (Advanced)
<div class=“Header”>
<p> Lorem ipsum dolor sit amet, </p>
< div>
<div class=“left”>
<p> Lorem ipsum dolor sit amet, </p>
<div>
<div class=“right”>
<p> Lorem ipsum dolor sit amet, </p>
</ div>
<div class=“footer”>
<p> Lorem ipsum dolor sit amet, </p>
<div>
In HTML
➔Alternative methods to slice the page:
Slicing The Web
3- Using “ float + padding + margin ”
➔Samples & Examples:
Slicing The Web
Simple Examples
1 Column 2 Column 3 Column
1 1 2 1 2 3
➔Samples & Examples:
Slicing The Web
Advanced Examples
➔Troubleshooting of some CSS problems that facing you during <DIV>ing:
Slicing The Web
Web Developer Add-on for FireFox (toolbar)
Click here to download it ( Note that it is still not for IE)
Helpful tool:
➔Troubleshooting of some CSS problems that facing you during <DIV>ing:
Slicing The Web
Discussing some cases
►Expanded web pages
►Horizontal scroll
►Percentage width values

More Related Content

PPT
Twitter bootstrap training_session_ppt
PDF
Introduction to Twitter Bootstrap 3.0.3
PPTX
Bootstrap webtech presentation - new
PDF
Critical Rendering Path
PDF
Front End Best Practices
PDF
Introduction to HTML and CSS
PDF
3 coding101 fewd_lesson3_your_first_website 20210105
PDF
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4
Twitter bootstrap training_session_ppt
Introduction to Twitter Bootstrap 3.0.3
Bootstrap webtech presentation - new
Critical Rendering Path
Front End Best Practices
Introduction to HTML and CSS
3 coding101 fewd_lesson3_your_first_website 20210105
Girl Develop It Cincinnati: Intro to HTML/CSS Class 4

What's hot (19)

PPTX
HTML/CSS the beginning
PPTX
Html - By Auroskkil
ODP
Cascading Style Sheets - Part 02
PDF
CSS Best practice
KEY
Slow kinda sucks
PPT
Css best practices style guide and tips
PPTX
Basics of Front End Web Dev PowerPoint
PPTX
Bootstrap [part 2]
PDF
How to use CSS3 in WordPress
PDF
Standardizing the Web: A Look into the Why of Web Standards
PDF
CSS Introduction
DOCX
Tercer trabajo de drapi 02
PPTX
About Best friends - HTML, CSS and JS
PPT
Css Best Practices
PPT
Twitter bootstrap (css, components and javascript)
PDF
Pemrograman Web 4 - Bootstrap 3
PDF
CSS3 Introduction
PPSX
HTML & XHTML Basics
PDF
Efficient, maintainable CSS
HTML/CSS the beginning
Html - By Auroskkil
Cascading Style Sheets - Part 02
CSS Best practice
Slow kinda sucks
Css best practices style guide and tips
Basics of Front End Web Dev PowerPoint
Bootstrap [part 2]
How to use CSS3 in WordPress
Standardizing the Web: A Look into the Why of Web Standards
CSS Introduction
Tercer trabajo de drapi 02
About Best friends - HTML, CSS and JS
Css Best Practices
Twitter bootstrap (css, components and javascript)
Pemrograman Web 4 - Bootstrap 3
CSS3 Introduction
HTML & XHTML Basics
Efficient, maintainable CSS
Ad

Viewers also liked (15)

PPT
State Of U V2
PDF
Aanvraagformulier Vog Np 2009
PPTX
Evaluation Of The Final Product
PPT
State Of U V3
PPTX
Roken Groep Marjolein
PPT
State Of U V1
PPT
Cisp In Pictures 97
PPTX
Roken Groep Monique
PPS
Biosphere
TXT
How to study and teaching how to study
PDF
Solidarity Responsibility Job Incentive Scheme Master Thesis Daan Struyvenv3
PPTX
Linkin Park-Fort Minor
PDF
Trabalho em Equipe
PPTX
Estratégia para vencer na crise
PPS
MindShift Events Profile 2009
State Of U V2
Aanvraagformulier Vog Np 2009
Evaluation Of The Final Product
State Of U V3
Roken Groep Marjolein
State Of U V1
Cisp In Pictures 97
Roken Groep Monique
Biosphere
How to study and teaching how to study
Solidarity Responsibility Job Incentive Scheme Master Thesis Daan Struyvenv3
Linkin Park-Fort Minor
Trabalho em Equipe
Estratégia para vencer na crise
MindShift Events Profile 2009
Ad

Similar to Slicing the web (20)

PPTX
Shreyansh_patni web developer
PPTX
Web Design Norms
PPTX
Introduction to HTML+CSS+Javascript.pptx
KEY
Artdm171 Week4 Tags
PPT
Supplement web design
PDF
Intro to HTML & CSS
PPTX
HTML Tutorials
PDF
Pfnp slides
PDF
HTML CSS Best Practices
PDF
Web Design for Literary Theorists II: Overview of CSS (v 1.0)
PPTX
Web technologies: Lesson 2
PDF
Front End Good Practices
ODP
Creating Web Sites with HTML and CSS
PPTX
web development basics tables part2
PDF
CSS Foundations, pt 2
DOCX
ARTICULOENINGLES
PPTX
BITM3730 9-13.pptx
PDF
HTML&CSS_notes.pdf
PDF
7 web design
Shreyansh_patni web developer
Web Design Norms
Introduction to HTML+CSS+Javascript.pptx
Artdm171 Week4 Tags
Supplement web design
Intro to HTML & CSS
HTML Tutorials
Pfnp slides
HTML CSS Best Practices
Web Design for Literary Theorists II: Overview of CSS (v 1.0)
Web technologies: Lesson 2
Front End Good Practices
Creating Web Sites with HTML and CSS
web development basics tables part2
CSS Foundations, pt 2
ARTICULOENINGLES
BITM3730 9-13.pptx
HTML&CSS_notes.pdf
7 web design

Recently uploaded (20)

PPTX
mahatma gandhi bus terminal in india Case Study.pptx
PPTX
Implications Existing phase plan and its feasibility.pptx
PDF
Phone away, tabs closed: No multitasking
PPTX
areprosthodontics and orthodonticsa text.pptx
PDF
SEVA- Fashion designing-Presentation.pdf
PDF
Urban Design Final Project-Context
PDF
Benefits_of_Cast_Aluminium_Doors_Presentation.pdf
PPTX
Tenders & Contracts Works _ Services Afzal.pptx
PDF
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
PDF
High-frequency high-voltage transformer outline drawing
PPT
EGWHermeneuticsffgggggggggggggggggggggggggggggggg.ppt
PDF
Trusted Executive Protection Services in Ontario — Discreet & Professional.pdf
PDF
YOW2022-BNE-MinimalViableArchitecture.pdf
PDF
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
PDF
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
PPTX
Wisp Textiles: Where Comfort Meets Everyday Style
DOCX
actividad 20% informatica microsoft project
PDF
Design Thinking - Module 1 - Introduction To Design Thinking - Dr. Rohan Dasg...
PPTX
Causes of Flooding by Slidesgo sdnl;asnjdl;asj.pptx
PPTX
DOC-20250430-WA0014._20250714_235747_0000.pptx
mahatma gandhi bus terminal in india Case Study.pptx
Implications Existing phase plan and its feasibility.pptx
Phone away, tabs closed: No multitasking
areprosthodontics and orthodonticsa text.pptx
SEVA- Fashion designing-Presentation.pdf
Urban Design Final Project-Context
Benefits_of_Cast_Aluminium_Doors_Presentation.pdf
Tenders & Contracts Works _ Services Afzal.pptx
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
High-frequency high-voltage transformer outline drawing
EGWHermeneuticsffgggggggggggggggggggggggggggggggg.ppt
Trusted Executive Protection Services in Ontario — Discreet & Professional.pdf
YOW2022-BNE-MinimalViableArchitecture.pdf
GREEN BUILDING MATERIALS FOR SUISTAINABLE ARCHITECTURE AND BUILDING STUDY
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
Wisp Textiles: Where Comfort Meets Everyday Style
actividad 20% informatica microsoft project
Design Thinking - Module 1 - Introduction To Design Thinking - Dr. Rohan Dasg...
Causes of Flooding by Slidesgo sdnl;asnjdl;asj.pptx
DOC-20250430-WA0014._20250714_235747_0000.pptx

Slicing the web

  • 1. Slicing The Web By: M. Aladdin Hemmat August, 2008 slicing using tableless or DIV technique
  • 2. ➔Objective of this training: Slicing The Web 1- To review the slicing techniques and when I’m talking about Techniques, I’m talking about how to slice the design inside the Graphic program. 2- To know how to convert in between the design to a coded webpage. 2- To get a good knowledge of CSS with stress on Styles that is used in slicing. 3- To troubleshoot any kind of webpage templates.
  • 3. Slicing The Web Designing Phase “Photoshop” Or the graphic program you are using to make your design Coding Phase “HTML / XHTML” The code of the webpage Styling Phase CSS Cascading style sheets ✓ Design to HTML ✓ Design Tips that will be very helpful at ‘DIV’ing or slicing as general ✓ <DIV> Vs <Table> ✓ Does <Table> is that bad?! ✓ Necessary HTML tags (incase of using <DIV>) ✓ Samples & Examples of <Table> WebPages ✓ Samples & Examples of <DIV> WebPages ✓ CSS Tags needed ✓ Alternative methods to slice the page using CSS ✓ Samples & Examples ✓ How to troubleshoot CSS problems during <DIV>ing Slicing The Web
  • 5. ➔Design to HTML: Slicing The Web 1- slicing techniques. 2- Using PhotoShop to Export the design as a webpage.
  • 6. ➔Design Tips that will be very helpful at ‘DIV’ing or slicing as general: 1- Optimize the spaces with solid colors, by using hex CSS code instead of pictures. Slicing The Web 2- use background image using CSS.
  • 8. ➔<DIV> Vs <Table>: Slicing The Web Table Technique DIV Technique 1 Ease Easy and Intuitive Not quite easy 2 SEO Friendly Friendly 3 Flexibility less flexibility More flexible 4 CSS need Not often used Usually used or in most cases 5 Code weight More code weight Less code weight 6 Code understanding Easy to be understood Not quite easy to understood 7 How many Cells It has rows , column and therefore cells Just one cell per DIV 8 Maintainability Easy but take time Little complicated but efficient 9 Cell Float Cell can’t float in the page Cell can float in the page
  • 9. ➔<DIV> Vs <Table>: Slicing The Web According to HTML Structure and weight of the code:
  • 10. ➔Does <Table> is that bad ?! Slicing The Web NO But why? tell me why I have to use <table> any more? ➔The rigidity of the structure. ➔The ease of understanding in some complicated structures. !Of course these advantages are according to slicing point of view.
  • 11. ➔Necessary HTML tags (incase of using <DIV>): Slicing The Web <div> ------------------- <span> ------------------- <ul> <ol> <li> ------------------- <br> <hr>
  • 12. ➔Necessary HTML tags (incase of using <DIV>): Slicing The Web <div> Example <div id=“header” style=“color: #FFF;”></div> <div class=“header” style=“color: #FFF;”></div> Attributes (id ,class, style) The <div> tag defines a division/section in a document.<div>
  • 13. ➔Necessary HTML tags (incase of using <DIV>): Slicing The Web <span> Attributes (id ,class, style) Example <span id=“header” style=“color: #FFF;”></span> <span class=“header” style=“color: #FFF;”></span> The <span> tag is used to group inline-elements in a document.<span>
  • 14. ➔Necessary HTML tags (incase of using <DIV>): Slicing The Web <dl> <dt> <dd> Attributes (id ,class, style) Example <dl>
 <dt> Coffee </dt> 
 <dd> Black hot drink </dd> 
 <dt> Milk </dt> 
 <dd> White cold drink </dd> 
 </dl> The <dl> tag defines a definition list.<dl> The <dt> tag defines the start of a term in a definition list.<dt> The <dd> tag defines the description of a term in a definition list.<dd> Coffee Black hot drink Milk White cold drink
  • 15. ➔Necessary HTML tags (incase of using <DIV>): Slicing The Web <ul> <ol> <li> The <ul> tag defines an unordered list.<ul> The <ol> tag defines the start of an ordered list.<ol> The <li> tag defines the start of a list item. The <li> tag is used in both ordered (<ol>) and unordered lists (<ul>).<li>
  • 16. ➔Necessary HTML tags (incase of using <DIV>): Slicing The Web <ul> <ol> <li> Example <ol>
 <li>Coffee</li> 
 <li>Tea</li> 
 <ol/> <<ul
 <li>Coffee</li>
 <li>Tea</li>
 <ul/> 1. Coffee 2. Tea • Coffee • Tea
  • 17. ➔Necessary HTML tags (incase of using <DIV>): Slicing The Web <br> <hr> The <br> tag inserts a single line break. In HTML the <br> tag has no end tag, like this: <br>. In XHTML the <br> tag must be properly closed, like this: <br />. Attributes (id ,class, style) Example <hr class=“break” style=“color:#FFF;” /> @XHTML <br class=“break” style=“color:#FFF;” /> @XHTML The <hr> tag inserts a horizontal rule. In HTML the <hr> tag has no end tag. In XHTML the <hr> tag must be properly closed, like this: <hr />. <hr> <br>
  • 18. ➔Samples & Examples of <Table> WebPages: Slicing The Web
  • 19. ➔Samples & Examples of <DIV> WebPages: Slicing The Web
  • 21. ➔CSS Tags needed: Slicing The Web Background:; ------------------- Padding:; ------------------- Margin:; ------------------- Float:; ------------------- Position:; ------------------- Display:; ------------------- Direction:;
  • 22. ➔CSS Tags needed: Slicing The Web Background:; Background-color: #FFF; Background-images: url( images/pic.jpg) ; Background-position: center top ; Background-repeat: repeat-x ; Background-attachment: scroll ; Background: #FFF url(images/pic.jpg) center top repeat scroll;
  • 23. ➔CSS Tags needed: Slicing The Web Padding:; Padding-top: 30px; Padding-left: 30px; Padding-bottom: 30px; Padding-right: 30px; Padding: 10px 30px 10px 30px ; Padding: 10% 30% 10% 30% ;
  • 24. ➔CSS Tags needed: Slicing The Web Margin:; margin-top: 30px; margin-left: 30px; margin-bottom: 30px; margin-right: 30px; margin: 10px 30px 10px 30px ; margin: 10% 30% 10% 30% ; margin: -10px -30px -10px -30px ;
  • 25. ➔CSS Tags needed: Slicing The Web Float:; Float: Right Left
  • 26. ➔CSS Tags needed: Slicing The Web Position:; Position: Relative; Absolute; Fixed; Static; Z-index: +1; 0; -1; Z-index can be used to place an element "behind" another element.
  • 27. ➔CSS Tags needed: Slicing The Web Display:; Display: Block; Inline; None;
  • 28. CSS Tags needed: Slicing The Web Direction:; Direction: ltr; (left to right) rtl; (right to left)
  • 29. ➔Alternative methods to slice the page: Slicing The Web Using <table> Using Float + Padding + Margin Using Float Left column Right column
  • 30. ➔Alternative methods to slice the page: Slicing The Web 1- Using <table> <table width="800" cellspacing="2" cellpadding="5" border="1"> <tr> <td colspan="2"> <p>Lorem ipsum dolor sit amet,</p> </td> </tr> <tr> <td width="150"> <p>Lorem ipsum dolor sit amet,</p> </td> <td width="650" valign="top"> <p>Lorem ipsum dolor sit amet,</p> </td> </tr> <tr> <td colspan="2" valign="top"> <p>Lorem ipsum dolor sit amet,</p> </td> </tr> </table> In HTML
  • 31. ➔Alternative methods to slice the page: Slicing The Web 2- Using “ float ” <div class=“Header”> <p> Lorem ipsum dolor sit amet, </p> < div> <div class=“left”> <p> Lorem ipsum dolor sit amet, </p> <div> <div class=“right”> <p> Lorem ipsum dolor sit amet, </p> </ div> <div class=“footer”> <p> Lorem ipsum dolor sit amet, </p> <div> In HTML
  • 32. ➔Alternative methods to slice the page: Slicing The Web 2- Using “ float ” .header{ width: 800px ; height: 100px ; margin: 5px auto 5px auto ; } .left{ width: 140px; <<<<<<<<<<<<<<<<<<<<<< float: left; margin: 5px 5px 5px 5px ; } .right{ width:640px ; <<<<<<<<<<<<<<<<<<<<<< float: right ; margin: 5px 5px 5px 5px ; } .footer{ width: 800px ; height: 50px ; margin: 5px auto 5px auto ; clear: both ; } In CSS
  • 33. ➔Alternative methods to slice the page: Slicing The Web 3- Using “ float + padding + margin ” (Advanced) <div class=“Header”> <p> Lorem ipsum dolor sit amet, </p> < div> <div class=“left”> <p> Lorem ipsum dolor sit amet, </p> <div> <div class=“right”> <p> Lorem ipsum dolor sit amet, </p> </ div> <div class=“footer”> <p> Lorem ipsum dolor sit amet, </p> <div> In HTML
  • 34. ➔Alternative methods to slice the page: Slicing The Web 3- Using “ float + padding + margin ”
  • 35. ➔Samples & Examples: Slicing The Web Simple Examples 1 Column 2 Column 3 Column 1 1 2 1 2 3
  • 36. ➔Samples & Examples: Slicing The Web Advanced Examples
  • 37. ➔Troubleshooting of some CSS problems that facing you during <DIV>ing: Slicing The Web Web Developer Add-on for FireFox (toolbar) Click here to download it ( Note that it is still not for IE) Helpful tool:
  • 38. ➔Troubleshooting of some CSS problems that facing you during <DIV>ing: Slicing The Web Discussing some cases ►Expanded web pages ►Horizontal scroll ►Percentage width values