Jump to content

[SOLVED] width of table %


anatak

Recommended Posts

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>

Link to comment
Share on other sites

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 ?

 

 

 

Link to comment
Share on other sites

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 :D

 

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
}

Link to comment
Share on other sites

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

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.