473,407 Members | 2,315 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Html and Css (divs)

Hi all,

i want to learn the divs without <tables> <tr> and <td>, is there any chance to learn divs.

help me out

Regards,
suren
9949811007
Mar 20 '08 #1
4 1368
ronverdonk
4,258 Expert 4TB
When you google for 'table without table' yo're likely to get a lot of hits. Try the following tutorial on this webpages without tables

Ronald
Mar 20 '08 #2
Here is a sample of using divs instead of tables + CSS

Expand|Select|Wrap|Line Numbers
  1. <html>
  2.     <head>
  3.         <style type="text/css">
  4.             body { margin:0 0 0 0; font-family:arial; }
  5.             h1 { font-weight:bold; white-space:nowrap; font-size:12pt; margin:0}
  6.             table { border-collapse:collapse; border:width:0 0 0 0; border-outset:0; border-inset:0; }
  7.             td, th { padding:0 5pt 0 5pt; margin:0; white-space:nowrap; }
  8.             .header { font-size:8pt; }
  9.  
  10.             div.page { float:top; width:1050; height:600; page-break-inside:avoid; page-break-after:auto; }
  11.             div.page_hdr { float:top; background-color:#FF0; }
  12.             div.page_bdy { float:top; height:100%; background-color:#F0F; }
  13.  
  14.             div.inners { float:top; width:100%; height:50%; background-color:#0FF; }
  15.             div.outers { float:top; width:100%; height:50%; background-color:#F0F; }
  16.  
  17.             div.inner { float:left; width:33.33%; height:100%; border:2pt solid #999; background-color:#F08; }            
  18.             div.outer { float:left; width:50%; height:100%; border:2pt solid #999; background-color:#80F; }
  19.  
  20.             div.inner_hdr { float:top; width:100%; height:10%; border-bottom:1pt solid #999; background-color:#EEE; }
  21.             div.outer_hdr { float:top; width:100%; height:10%; border-bottom:1pt solid #999; background-color:#EEE; }
  22.  
  23.             div.inner_ftr { float:top; width:100%; height:10%; border-top:1pt solid #999; background-color:#EEE; }
  24.             div.outer_ftr { float:top; width:100%; height:10%; border-top:1pt solid #999; background-color:#EEE; }
  25.  
  26.             div.inner_bdy { float:top; width:100%; height:80%; }
  27.             div.outer_bdy { float:top; width:100%; height:80%; }
  28.  
  29.         </style>
  30.     </head>
  31.     <body>
  32.         <div class="page">
  33.             <div class="page_hdr">
  34.                 <h1>TITLE</h1>
  35.                 <hr/>
  36.                 <table>
  37.                     <tr>
  38.                         <td>data</td>
  39.                         <td>more data</td>
  40.                     </tr>
  41.                     <tr>
  42.                         <td>data</td>
  43.                         <td>more data</td>
  44.                     </tr>
  45.                     <tr>
  46.                         <td>data</td>
  47.                         <td>more data</td>
  48.                     </tr>
  49.                     <tr>
  50.                         <td>data</td>
  51.                         <td>more data</td>
  52.                     </tr>
  53.                     <tr>
  54.                         <td>data</td>
  55.                         <td>more data</td>
  56.                     </tr>
  57.                 </table>
  58.                 <hr/>
  59.             </div>
  60.             <div class="page_bdy">
  61.                 <div class="inners">
  62.                     <div class="inner">
  63.                         <div class="inner_hdr">
  64.                             some
  65.                         </div>
  66.                         <div class="inner_bdy">
  67.                             other
  68.                         </div>
  69.                         <div class="inner_ftr">
  70.                             stuff
  71.                         </div>
  72.                     </div>
  73.                     <div class="inner">
  74.                         <div class="inner_hdr">
  75.                             somer
  76.                         </div>
  77.                         <div class="inner_bdy">
  78.                             other
  79.                         </div>
  80.                         <div class="inner_ftr">
  81.                             stuff
  82.                         </div>
  83.                     </div>
  84.                     <div class="inner">
  85.                         <div class="inner_hdr">
  86.                             some
  87.                         </div>
  88.                         <div class="inner_bdy">
  89.                             other
  90.                         </div>
  91.                         <div class="outer_ftr">
  92.                             stuff
  93.                         </div>
  94.                     </div>
  95.                 </div>
  96.                 <div class="outers">
  97.                     <div class="outer">
  98.                         <div class="outer_hdr">
  99.                             some
  100.                         </div>
  101.                         <div class="outer_bdy">
  102.                             other
  103.                         </div>
  104.                         <div class="outpart_ftr">
  105.                             stuff
  106.                         </div>
  107.                     </div>
  108.                     <div class="outer">
  109.                         <div class="outer_hdr">
  110.                             part_number
  111.                         </div>
  112.                         <div class="outer_bdy">
  113.                             other
  114.                         </div>
  115.                         <div class="outer_ftr">
  116.                             stuff
  117.                         </div>
  118.                     </div>
  119.                 </div>
  120.             </div>            
  121.         </div>
  122.     </body>
  123. </html>
  124.  
  125.  
Mar 20 '08 #3
drhowarddrfine
7,435 Expert 4TB
jerry,
Did you test that? There is no such thing as 'float:top' and the page breaks don't work in all browsers.
Mar 20 '08 #4
Sorry drhowarddrfine is correct, my example does not work on all browsers, due to the page-break-xxx CSS not being supported in all browsers, and I do not know where I got float:top from! Appologies!
Mar 21 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Rithish | last post by:
I want to emulate paging in an HTML document. something like, ------------------------- | | | <DIV> | | | | <TABLE></TABLE>...
14
by: Charlie T | last post by:
Hello, is there any way to get this to work? myID.innerHTML = "Hello" <DIV id="myID"></DIV> <DIV id="myID"></DIV>
39
by: WindAndWaves | last post by:
Hi Gurus I have a page, which looks a bit like this: .... <body> <div ID=id1>................</DIV> <div ID=gsd>................</DIV> <div ID=ewd>................</DIV> <div...
5
by: ruby_bestcoder | last post by:
Hi I already posted this in the javascript group, but seemed to be the wrong place to ask. The code I will post here works in IE, but not in ff. Its basically a group of li that contain divs....
78
by: Robert Baer | last post by:
The homepage i have had up and seemingly working is: http://oil4lessllc.com/ However, the validator has so many complaints, and being so incompetent, i have no clue as to how to fix it all. Would...
1
by: Patrick | last post by:
I need to parse and HTML document of the following format. I am interested to obtain all the HTML from and including the first <div class="data"> up to and including Data updated dd/mm/yyyy...
3
by: al jones | last post by:
since c.i.w.a.* seem to be *very* conscious of 'the correct group' I hope you'll bear with me here or direct me to the correct one. I'm trying to help a friend redo a site which was done in DW...
53
by: brave1979 | last post by:
Please check out my javascript library that allows you to create any layout for your web page, nested as deep as you like, adjusting to width and height of a browser window. You just describe it in...
3
by: Steve | last post by:
Hi; I'm working on a demo of using a timer on a web site that is made visible by making a div visible. My "PopIn Box" div is empty on the page. Before making it visible I used javascript to...
2
by: themadjester | last post by:
Hello, I am fairly new to web and am making a page I am happy with, however I am wonding if my method is flawed. Currently what I do is load everything into a monster sized sting in my php script...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.