Switch to full style
HTML code examples
Post a reply

Creating table using div tag

Sat Jan 07, 2012 10:41 am

create table using div and css, the idea is to use many div tags to create a table look.
Code:


<html>
    <head>
        <title>Create table using Div</title>
        <style type='text/css'>
            div#container {
                border: 1px solid;
                margin:5px;
                background: #ACFF22;
            }
            div#float {
                text-align: center;
                float: left;
                border: 1px solid black;
                width: 140px;
                height: 100px;
            }
            div.tableContent {
                background: #FBCA43;
                border: 1px solid black;
            }
            div#Footer {
                border: 1px solid black;
                background: lightgreen;
                clear: both;   
            
}
        </style>
    </head>
    <body>
        <div id='container'>
            <div id='float'>
                Column 1
                  
<div class='tableContent'>
                   Data 1
                    
</div>
            </div>
              <div id='float'>
                Column 2
                  
<div class='tableContent'>
                   Data 2
                  
</div>
            </div>
              <div id='float'>
                Column 3
                  
<div class='tableContent'>
                   Data 3
                    
</div>
            </div>
           
              
                Data main div
            
<div class='tableContent'>
                 Data 
            
</div>
                Data main div
            
<div id='Footer'>
                 Can be used as table footer
            
</div>
            <div>
                
            
</div>
        </div>
    </body>
</
html>
 




Post a reply
  Related Posts  to : Creating table using div tag
 Creating a Method in jsp     -  
 Creating a Directory in php     -  
 Creating Brushes with Illustrator     -  
 Creating Rollovers in Photoshop     -  
 creating arrays in java     -  
 Creating Glass Buttons     -  
 Creating your own Exceptions in Java     -  
 Creating a Database in MySQL     -  
 Creating Menu Button     -  
 Creating a JAR file in Java     -  

Topic Tags

HTML Div