anatak Posted October 5, 2009 Share Posted October 5, 2009 I am trying to set the width of a table to 90% but I can not get it to work. Maybe I doing it all wrong ? thanks for looking anatak /*table style*/ table.single_bike { width:"90%" } <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta name="description" content="Vintage Motor Japan: Ducati 900 MHR for sale MHR from 1981 excellent condition. conti mufflers, Delorto 40 PHM carbs, custom rear bridge with custom rear brake brace twin seat engine is still factory sealed original rear bridge is included" /> <meta name="keywords" content="motorcycle, motorbike, bike, for sale, Ducati, 900 MHR" /> <link rel="stylesheet" href="../stylesheet/css_bike.css" type="text/css" /> <title>Vintage Motor Japan: Ducati 900 MHR for sale</title> </head> <body> <div id="wrap"> <div id="header"><h1 class="center">Vintage Motor Japan</h1> <div id="hori_navcontainer"> <ul> <li><a class="nav_button" id="buttonNAV" href="home.html">Home</a></li> <li><a class="nav_button" id="buttonNAV" href="contact.html">contact</a></li> <li><a class="nav_button" id="buttonNAV" href="list_bike_all_1.html">bike</a></li> </ul> </div> </div> <div id="main"> <table class="single_bike"> <tr><td>Ducati 900 MHR</td> <td>1300000 yen</td> </tr> <tr><td>Year: 1981</td> <td>Shaken: 2010</td> <td>Status: for sale</td> </tr> <tr><td>Mileage: 21000 km</td> <td>Framenr: DMZ860</td> <td>EngineNr: DMZ860</td> </tr> <tr><td>CC: 900</td></tr> <tr><td colspan="3">MHR from 1981<br /> excellent condition. conti mufflers, Delorto 40 PHM carbs, custom rear bridge with custom rear brake brace<br /> twin seat<br /> <br /> engine is still factory sealed<br /> original rear bridge is included</td></tr> <tr><td></td> </tr> <tr><td></td> </tr> </table> <div id="picture" class="center"> <div id="picture_1"><img src="../picture/Ducati_3/big_ducati_3_0.jpg" /><br /> right side</div> <br /><br /> <div id="picture_2"><img src="../picture/Ducati_3/big_ducati_3_1.jpg" /><br /> bevel engine</div> <br /><br /> <div id="picture_3"><img src="../picture/Ducati_3/big_ducati_3_2.jpg" /><br /> del Orto 40PHM carburetor</div> <br /><br /> <div id="picture_4"><img src="../picture/Ducati_3/big_ducati_3_3.jpg" /><br /> Conti exhaust</div> <br /><br /> <div id="picture_5"><img src="../picture/Ducati_3/big_ducati_3_4.jpg" /><br /> dashboard</div> <br /><br /> <div id="picture_6"><img src="../picture/Ducati_3/big_ducati_3_5.jpg" /><br /> Ducati front wheel</div> <br /><br /> <div id="picture_7"><img src="../picture/Ducati_3/big_ducati_3_6.jpg" /><br /> Ducati rear wheel</div> <br /><br /> <div id="picture_8"><img src="../picture/Ducati_3/big_ducati_3_7.jpg" /><br /> rear brake caliper and custom mount</div> <br /><br /></div> </div> <div id="footer">footer text <?php echo "test on php"; ?> </div> </div> </body> </html> Quote Link to comment Share on other sites More sharing options...
haku Posted October 5, 2009 Share Posted October 5, 2009 width:90%; Quote Link to comment Share on other sites More sharing options...
haku Posted October 5, 2009 Share Posted October 5, 2009 Where in Japan are you by the way? Also, posting your email addresses raw like that is likely to get you spammed to death once the spam bots pull your addresses off this site. Quote Link to comment Share on other sites More sharing options...
anatak Posted October 5, 2009 Author Share Posted October 5, 2009 Hello Haku, I am in Kitakyushu (southern part of Japan). the email addresses are from some not so nice people who made my life a little bit miserable so it is actually the idea that they get spammed. long story How can I center the table but without centering the text ? do I have to put the table in a div and text-align the div ? Quote Link to comment Share on other sites More sharing options...
haku Posted October 5, 2009 Share Posted October 5, 2009 Hello Haku, I am in Kitakyushu (southern part of Japan). Cool, I'm in Yokohama myself. I've actually been to kitakyushu (kokura). I went there for a conference a year or two ago. the email addresses are from some not so nice people who made my life a little bit miserable so it is actually the idea that they get spammed. long story Cruel! I gotta remember that one How can I center the table but without centering the text ? do I have to put the table in a div and text-align the div ? table { margin:0 auto; // centers the table } Quote Link to comment Share on other sites More sharing options...
anatak Posted October 5, 2009 Author Share Posted October 5, 2009 hey Haku, feel free to contact me when you come down to Kokura again. always nice to see some other programmers/nerds/pc enthusiasts/whatever thanks for the help I set the margins left and right to auto after reading this page http://www.granneman.com/webdev/coding/css/centertables/ excellent stuff I am going to check the resources and add this page if it is not there yet Quote Link to comment Share on other sites More sharing options...
haku Posted October 5, 2009 Share Posted October 5, 2009 Just to let you know, that code I gave you did exactly that - it is shorthand for setting the left and right margins to auto. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.