I'm going to implement this
The layout is exactly like it is tables so I'm considering using tables instead of divs as recommended. What do you recommend? Could you give me a code skeleton to start with so that I know how to begin since otherwise I will just do tables since that is the way this page looks - tabular data. What do you recommend?
My start displays this
And the code I used for this is
<div class="yta2 TB_nb fontS80 ">
<div class="clear "> </div>
<div class="fr1 "> </div>
<div class="fr5 "><input type="button" value="Historik"></div>
<div class="fl30"><h2>Grunduppgifter</h2></div>
<div class="clear quarter"> </div>
</div>
<div class="clear "></div>
<div id="indag" class="yta2 TB_nb fontS80">
<div class="clear half"> </div>
<div class="fl10"><h3>Ingivningsdag</h3></div>
<div class="fl20">Ansökans beroende:</div>
<div class="fl20">Oberoende ansökan</div>
<div class="fl10"> </div>
<div class="fl1"> </div>
<div class="fl20"></div>
<div id="ob">
<div class="fr10 smallg">Förnamn Efternamn,<br>handläggarkod<br><br></div>
<div class="fl10"></div>
<div id="datum" class="fl20">Datum ingivningsdag:</div>
<div class="fl20">2009-01-01
</div>
<div id="ff" style="display: none;">
<div class="fr10 smallg">Förnamn Efternamn,<br>handläggarkod</div>
<div class="fl10"></div>
<div class="fl20">Fullföljd från:</div>
<div class="fl20"><input type="text"></div>
<div class="clear"></div>
<div class="fl10"></div>
<div class="fl20">WO-nummer:</div>
<div class="fl20"><input type="text"></div>
<div class="clear"></div>
<div class="fl10"></div>
<div class="fl20">Internationell ingivningsdag:</div>
<div class="fl20"><input type="text"> <img src="images/cal.gif" alt="" width="16" height="15" border="0"></div>
</div>
<div id="avd" style="display: none;">
<div class="fr10 smallg">Förnamn Efternamn,<br>handläggarkod</div>
<div class="fl10"></div>
<div class="fl20">Avdelad från:</div>
<div class="fl20"><input type="text"><input type="button" value="Sök"></div>
<div class="clear"></div>
<div class="fl10"></div>
<div id="datum" class="fl20">Datum ingivningsdag:</div>
<div class="fl20"><input type="text"> <img src="images/cal.gif" alt="" width="16" height="15" border="0"></div>
</div>
<div id="utb" style="display: none;">
<div class="fr10 smallg">Förnamn Efternamn,<br>handläggarkod</div>
<div class="fl10"></div>
<div class="fl20">Utbruten från:</div>
<div class="fl20"><input type="text"><input type="button" value="Sök"></div>
<div class="clear"></div>
<div class="fl10"></div>
<div id="datum" class="fl20">Datum ingivningsdag:</div>
<div class="fl20"><input type="text"> <img src="images/cal.gif" alt="" width="16" height="15" border="0"></div>
</div>
<div id="oepa" style="display: none;">
<div class="fr10 smallg">Förnamn Efternamn,<br>handläggarkod</div>
<div class="fl10"></div>
<div class="fl20">EP- ansökningsnummer:</div>
<div class="fl20"><input type="text"><input type="button" value="Sök"></div>
<div class="clear"></div>
<div class="fl10"></div>
<div id="datum" class="fl20">Ankomstdatum (EP-ansökan)<br>eller ingivningsdag (EP-ansökan):</div>
<div class="fl20 mt5p"><input type="text"> <img src="images/cal.gif" alt="" width="16" height="15" border="0"></div>
</div>
<div id="aooep" style="display: none;">
<div class="fr10 smallg">Förnamn Efternamn,<br>handläggarkod</div>
<div class="fl10"></div>
<div class="fl20">Avdelad från:</div>
<div class="fl20"><input type="text"><input type="button" value="Sök"></div>
<div class="clear"></div>
<div class="fl10"></div>
<div class="fl20">EP- ansökningsnummer:</div>
<div class="fl20"><input type="text"><input type="button" value="Sök"></div>
<div class="clear"></div>
<div class="fl10"></div>
<div id="datum" class="fl20">Ankomstdatum (EP-ansökan)<br>eller ingivningsdag (EP-ansökan):</div>
<div class="fl20 mt5p"><input type="text"> <img src="images/cal.gif" alt="" width="16" height="15" border="0"></div>
</div>
<div class="fl10"></div>
<div class="clear"></div>
</div><!-- indag -->
<div class="clear lh10"> </div>
<div id="sokupp" class="yta2 TB_nb fontS80">
<div class="fl50" id="L-col">
<div class="clear half"> </div>
<div class="fl25"><h3>Sökande</h3></div>
Thank you
People recommend div's instead of tables because the tables take time to be loaded in the page as compared to other tags(like div). The table is preferred due to their simplicity and clearness of your code.
Use
div
andtable
both.For the layout, you can use
div
to put the frames in where they should be. And then you can fill the frames withtable
s.The reason is that:
div
should be used to make the position right and thetable
should be used to show the data.For displaying tabular data, use a table. Use divs for the overall layout.
I would do with both.
Divs has main wrappers and tables on the inside (on the lines that justify it).
For example the last two lines don't justify the use of tables
Better use and both. But trying keeping the table tags less as it make the file large hence rendering slow. on the other hand are better then tables but writing CSS is a pain at times.
Using table & div both will also save u from the pain of cross platforms UI issues.
Try to keep the outer structure as table and inner at div.