ציטוט:
נכתב במקור על ידי Hagaibl
בישביל זה יש את הדבר שנקרא margin
אתה מגדיר מרווח פשוט,
תעיף את ה.3
ובמקום תוסיף:
margin-left: 0.3%;
לתא הראשון ולתא השני בכל שורה.
|
יצא לי משהו מוזר ביותר.
תראה:
http://img143.imageshack.us/img143/1352/abcde.png
הררוח לא יוצא אחיד..
אני רוצה שזה יהיה ככה:
1---2---3
4---5---6
7---8---9
בדיוק כמו טבלה.
עשיתי מה שאמרת..איפה הבעיה?
הנה הקוד:
PHP קוד:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-
8">
<title>Untitled Document</title>
<style>
.table {
border:solid #c0c0c0;
border-width:1px 1px 0px 0px;
}
.row {
overflow:auto;
border-bottom:solid 1px #c0c0c0;
}
.cell{
float:left;
text-align:center;
border:solid #c0c0c0;
border-width:0px 0px 0px 1px;
}
</style>
</head>
<body>
<div class="table" style="width:500px;margin:0 auto;">
<div class="row">
<div class="cell" style="width:33% margin-left:0.3%">1</div>
<div class="cell" style="width:33% margin-left:0.3%">2</div>
<div class="cell" style="width:33%">3</div>
</div>
<div class="row">
<div class="cell" style="width:33% margin-left:0.3%">4</div>
<div class="cell" style="width:33% margin-left:0.3%">5</div>
<div class="cell" style="width:33%">6</div>
</div>
<div class="row">
<div class="cell" style="width:33% margin-left:0.3%">7</div>
<div class="cell" style="width:33% margin-left:0.3%">8</div>
<div class="cell" style="width:33%">9</div>
</div>
</div>
</body>
</html>
תודה!