tienphuonghk Posted January 19, 2010 Share Posted January 19, 2010 Hi Everybody, I want to create timetable by css,I create css but look not fine.This is code below: <html><head><style type="text/css">#main2 {width:620px;margin:10px 0px 0px 0px;background:#fff;float:left;}#col {width:100%;float:left;background:#fff;}#left {width:400px;float:left;}#left h3 {color:#fff;font-size:1.2em;text-align:center;font-weight:bold;padding:5px;margin-right:1px;background:#5cb3ff;}#right {margin-left:400px;text-align:center;}#right h3 {color:#fff;font-size:1.2em;text-align:center;background:#5cb3ff;font-weight:bold;padding:5px;}#col1 {background:#5cb3ff;float:left;width:100%;}#left1 {width:400px;float:left;}#leftcontent1 {width:100%;margin:0;overflow:hidden;}#o1 {width:20%;float:left;color:#191919;}#o2 {width:70px;float:left;color:#191919;}#o3 {width:100px;float:left;color:#191919;}#o4 {width:70px;float:left;color:#191919;}#o5 {color:#191919;margin-left:320px;}#right1 {margin-left:400px;}p.text {padding:8px;text-align:left;background:#fff;margin-right:1px;margin-bottom:1px;}p.text1 {padding:8px;margin-right:1px;background:#fff;margin-bottom:1px;background:#fff;}p.text2 {padding:8px;margin-right:1px;margin-left:1px;background:#fff;}</body></html></style></head><body> <div id="main2"> <div id="col"> <div id="left"> <h3>Bus Information</h5> </div> <!--End left--> <div id="right"> <h3>Confirmed Address</h3> </div> <!-- End right--> </div> <!-- ENd col--> <div id="col1"> <div id="left1"> <div id="leftcontent1"> <div id="o1"> <p class="text2"> Departe</p> </div> <!--End o1--> <div id="o2"> <p class="text"> Return </p> </div> <!--End o2--> <div id="o3"> <p class="text"> Time </p> </div> <!-- End o3--> <div id="o4"> <p class="text"> Soft Seat </p> </div><!-- End o4--><div id="o5"><p class="text">Soft Berth</p></div><!-- End o5--></div><!-- End leftcontent1 --></div><!-- ENd left1 --><div id="right1"><p class="text1">Hoang khanh tourism</p></div><!-- End right1 --></div><!-- End col1--></body></html> You show me how to fix and create table with alot column and row. Link to comment Share on other sites More sharing options...
Synook Posted January 19, 2010 Share Posted January 19, 2010 If it's tabular data, use a table. Tables should be used to mark up truly tabular information ("data tables"). Content developers should avoid using them to lay out pages ("layout tables"). Link to comment Share on other sites More sharing options...
thescientist Posted January 19, 2010 Share Posted January 19, 2010 you would still use HTML to create a table. CSS just styles elements on the page. Read the tutorials on w3schools about tables under the HTML section. Link to comment Share on other sites More sharing options...
ProblemHelpPlease Posted January 19, 2010 Share Posted January 19, 2010 If you really dont want to use tables then you can achieve the same result with div's but a table and css layout/formatting combo is best. Link to comment Share on other sites More sharing options...
tienphuonghk Posted January 21, 2010 Author Share Posted January 21, 2010 If you really dont want to use tables then you can achieve the same result with div's but a table and css layout/formatting combo is best.Thanks you very much for advice Link to comment Share on other sites More sharing options...
roundcorners Posted January 21, 2010 Share Posted January 21, 2010 If you really dont want to use tables then you can achieve the same result with div's but a table and css layout/formatting combo is best.What do you mean by 'best'' Link to comment Share on other sites More sharing options...
thescientist Posted January 21, 2010 Share Posted January 21, 2010 I would imagine "best" in this case refers to using a table if you're actually trying to render tabular (or tabular like) data. Which could then be styled using CSS. Link to comment Share on other sites More sharing options...
ProblemHelpPlease Posted January 21, 2010 Share Posted January 21, 2010 Sorry, yes thats whats I meant, when using tabular data a table with css formatting makes the most sense. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.