CSS boxの例

class="cb01" での指定例です。ここは幅固定で、500pxです。

class="cb02" での指定例です。ここは幅指定無しです。

class="cb01" での指定例です。ここは幅固定で、500pxです。

class="cb01" での指定例です。ここは親boxに対して 50% です。

ここで指定している css-box.css の中身

.cb01 { 
  background-color: #ff00ff; 
  width: 500px;
}
.cb02 { 
  background-color: #d0d000; 
}
.cb03 { 
  background-color: #00d0d0; 
  width: 50%
}

.cb04 { 
  background-color: #d0d0d0; 
  width: 50%
}


#table3-1 {
  width: 70%;
}

td,th {
	border: solid;
}

親boxが幅50%の例

ここは指定無しの段落です。親boxは灰色の背景色が指定されています。 幅は親box(ここでは、window)に対して、50%幅に指定されています。

class="cb01" での指定例です。ここは幅固定で、500pxです。

class="cb02" での指定例です。ここは幅指定無しです。

class="cb01" での指定例です。ここは幅固定で、500pxです。

class="cb01" での指定例です。ここは親boxに対して 50% です。

table の幅指定

width: 70%

Table 3-1
th 1-1th 1-2th 1-3th 1-4th 1-5th 1-6
td 2-1td 2-2td 2-3td 2-42d 1-5td 2-6

width指定なし

Table 3-2
th 1-1th 1-2th 1-3th 1-4th 1-5th 1-6
td 2-1td 2-2td 2-3td 2-42d 1-5td 2-6