0
好傢伙,
我剛開始學習HTML和CSS,並決定開始我的第一次學習的項目。我正在嘗試重新創建發票模板,與附圖上的發票模板完全相同。我遇到的問題是,將表格標題對齊爲「船方法,訂單日期...」以便像圖片一樣展開。我已經嘗試調整th標籤內的寬度並設置像素值,但我卡住了。
感謝您的幫助,夥計們!
這是我迄今編碼:
<!DOCTYPE html>
<head>
<link rel="stylesheet" type="text/css"
href="https://fonts.googleapis.com/css?family=Roboto">
<style>
body {
font-family: 'Roboto';
margin: 0;
body: 0;
}
.shipto {
color: #fff;
white-space: pre;
background:#000;
width: 40px;
height: 225px;
position: relative;
left: 400px;
bottom: 30px;
}
.top-box {
color: #fff;
table-layout: fixed;
}
th {
white-space: nowrap;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<img src="https://c1.staticflickr.com/3/2926/32085237484_4b8c92a6b2_z.jpg" width="300" height="44" alt="Adidas Logo">
<div class="shipto">
<h4>
S
h
i
p
T
o
</h4>
<div class="top-box">
<table border="1" summary="order information" bgcolor="black" cellpadding="15" cellspacing="0">
<tr>
<th>SHIP METHOD</th>
<th>ORDER DATE</th>
<th>ORDER NO.</th>
<th>DELIVERY NO.</th>
<th>PAYMENT TYPE</th>
</tr>
</div>
</body>
感謝您抽出寶貴時間來幫助我。我很感激。 – Ceejay86