PDA

View Full Version : مشکل با div ها



boysilent
یک شنبه 02 بهمن 1390, 20:17 عصر
دوستان این وب منه ببینید به چه شکلی در اومده؟؟



<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" dir="rtl">
<head runat="server">
<title>WordHa</title>
<style type="text/css" media="all">
@import "images/style.css";
.style13
{
width: 656px;
height: 19px;
padding-bottom: 5px;
padding-left: 5px;
padding-right: 40;
padding-top: 5px;
margin: 0 0px 0 11px;
font-family: Tahoma;
text-align: center;
font-size: small;
}
.style16
{
width: 800px;
font-family: Tahoma;
font-size: small;
}
.style17
{
font-size: x-small;
}
.style19
{
font-size: larger;
text-align: right;
}
.style20
{
font-family: Tahoma;
}
</style>
</head>

<body>
<form id="form1" runat="server">




<div class="divkol div1"
style="background-color: #002731; background-image: url('ali.gif');">
<span class="style3"><a href="www.wordha.com" class="style7">
<span class="style11">صفحه اصلی</span></a><span class="style11">|درباره ما</span></span><span
class="style11"><span class="style3">|جستجو در سایت</span></span><span
class="style17"> <span class="style3"> <span class="style11">



</span></span><span class="style3">

</span>



</div>
<div class="divkol div2" dir="rtl"
style="background-image: url('3.jpg');"><br />
<br />

<br class="style11" />
</div>
<div class="divkol div3" style="background-color: #002731"><p class="style16">تاریخ امروز:<asp:Label ID="Label2"
runat="server" Text="Label"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; تعداد اعضا :<asp:Label ID="Label3" runat="server" Text="Label"></asp:Label>
</p>
</div>
<div class="divcenter" style="background-image: url('images/abi.png')">
<div class="divsm">
<div class="divm"

style="background-color: #002731; border-right-style: solid; border-right-width: 1px; border-top-color: #002731; border-right-color: #002731; border-left-color: #002731; border-top-style: solid; border-top-width: 1px; border-left-style: solid; border-left-width: 1px;">
منوی کاربری</div>
<div class=" divmo1"style="border-left: 1px solid #002731; border-right: 1px solid #002731; border-bottom: 1px solid #002731; height: 123px;">
<p class="p">
&nbsp;<asp:Label ID="Label4" runat="server" style="font-size: small"
Text="نام کاربری : "></asp:Label>
<asp:Button ID="Button3" runat="server" BackColor="#669900"
BorderStyle="None" Height="23px" onclick="Button3_Click"
style="font-family: Tahoma; margin-bottom: 4px"
Text="کنترل پنل شما" Visible="False" Width="208px" />
<asp:TextBox ID="TextBox1" runat="server" BackColor="White" BorderStyle="None"
Width="97px"></asp:TextBox>
</p>
<p class="p">
<asp:Label ID="Label5" runat="server" Text=" کلمه عبور : "
style="font-size: small" EnableViewState="False"></asp:Label>
&nbsp;
<asp:TextBox ID="TextBox2" runat="server" BorderStyle="None" Width="97px"
EnableViewState="False"></asp:TextBox>
</p>
<p class="style12">
<asp:Label ID="Label6" runat="server"
style="font-size: small; font-family: Tahoma; text-align: center; color: #CC0000"></asp:Label>
<asp:Label ID="Label7" runat="server"
style="font-size: small; font-family: Tahoma"
Text="کاربر گرامی شما با موفقیت وارد شدید." Visible="False"></asp:Label>
</p>
<p class="style12">
&nbsp;</p>
<p class="style12">
<span
class="style17">
<asp:Button ID="Button1" runat="server" BackColor="#336600" BorderStyle="None"
Height="23px" onclick="Button1_Click1" style="font-family: Tahoma" Text="ورود"
Width="89px" EnableViewState="False" />
</span>
<asp:Button ID="Button2" runat="server" BackColor="#669900" BorderStyle="None"
Height="20px" onclick="Button2_Click" style="font-family: Tahoma" Text="خروج"
Visible="False" Width="85px" EnableViewState="False" />
</p>

</div>
<br />
<div class="divm"style="background-color: #002731; border-right-style: solid; border-right-width: 1px; border-top-color: #002731; border-right-color: #002731; border-left-color: #002731; border-top-style: solid; border-top-width: 1px; border-left-style: solid; border-left-width: 1px;">
لینک ها</div>
<div class=" divmo1"style="border-left: 1px solid #002731; border-right: 1px solid #002731; border-bottom: 1px solid #002731; height: 310px; font-size: small;">
&nbsp;<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</div>


</div>
<div class="divmm">

<div class="style13"style="background-color: #002731; border-right-style: solid; border-right-width: 1px; border-top-color: #002731; border-right-color: #002731; border-left-color: #002731; border-top-style: solid; border-top-width: 1px; border-left-style: solid; border-left-width: 1px;">

موضوعات</div>

<br />



<asp:Repeater ID="Repeater1" runat="server"
onitemcommand="Repeater1_ItemCommand">
<ItemTemplate>
<table class="style15" width="663px">
<tr>
<td colspan="4" style="background-color:#002731; height:50px;">
<p align="center"><font face="Tahoma" size="2"><%# Eval("tittle") %></font></td>
</tr>
<tr>
<td width="12%" style="height:30px;"><font face="Tahoma" size="2">&nbsp;اندازه فایل:</font></td>
<td width="10%" style="height:30px;"><font face="Tahoma" size="2"><span lang="en-us"><%# Eval("hajf") %></span></font></td>
<td width="14%" style="height:30px;"><font face="Tahoma" size="2">تاریخ ارسال:</font></td>
<td width="41%" style="height:30px;"><font face="Tahoma" size="2"><span lang="en-us"><%# Eval("dfarsi") %></span></font></td>
</tr>
<tr>
<td width="12%" style="height:30px;"><font face="Tahoma" size="2">&nbsp;زبان فایل:</font></td>
<td width="10%" style="height:30px;"><font face="Tahoma" size="2"><span lang="en-us"><%# Eval("langu") %></span></font></td>
<td width="14%" rowspan="2" style="height:30px;"><font face="Tahoma" size="2">توضیحات:</font></td>
<td width="41%" rowspan="2" style="height:30px;"><font face="Tahoma" size="2">
<span lang="en-us"><%# Eval("descrip") %></span></font></td>
</tr>
<tr>
<td width="12%" style="height:30px;"><font face="Tahoma" size="2">&nbsp;نوع فایل:</font></td>
<td width="10%" style="height:30px;"><font face="Tahoma" size="2"><span lang="en-us"><%# Eval("format") %></span></font></td>
</tr>
<tr>
<td width="12%" style="height:30px;"><font face="Tahoma" size="2">&nbsp;تعداد صفحات<span lang="en-us">:</span></font></td>
<td width="10%" style="height:30px;"><font face="Tahoma" size="2"><span lang="en-us"><%# Eval("tsafhe") %></span></font></td>
<td width="14%" rowspan="2" style="height:30px;"><font face="Tahoma" size="2">دانلود:</font></td>
<td width="41%" rowspan="2" style="height:30px;"><font face="Tahoma" size="2">
<span lang="en-us">

<a href="files/<%# Eval("filenam") %>">
<asp:ImageButton ID="ImageButton1" runat="server" CommandArgument='<%# Eval("id") %>' ImageUrl="images/download.png" />
</a>
</tr>
<tr>
<td width="22%" colspan="2" rowspan="2" style="height:30px;">تعداد دانلود:<%# Eval("dl") %></td>
</tr>
<tr>
<td width="55%" colspan="2" style="height:30px;"><font face="Tahoma" size="2"><span lang="en-us">WordHa.com</span></font></td>
</tr>
</table>
<br />
</ItemTemplate>
</asp:Repeater>



&nbsp;

<table style="width: 653px">
<tr>
<td style="text-align: center">


<asp:Button ID="btnnex" runat="server" Text="صفحه بعد" BorderStyle="None"
onclick="btnnex_Click" BackColor="#336600" />
&nbsp;&nbsp;
<span class="style20">
<asp:Button ID="Btnprev" runat="server" Text="صفحه قبل" BorderStyle="None"
onclick="Btnprev_Click" BackColor="#336600" />

</span>

</td>
</tr>
</table>



<br />

<br class="style19" />

</div>

</div>

</form>
</body>
</html>







اینم csss



td
{
border: 1px solid #002731;
height: 9px;
}

body {
margin:0px 0;
padding:0;
color:#ccc;
background: #303B41 url(bg.jpg) repeat-x;
line-height: 1.4em;
direction:rtl;
font-style: normal;
font-variant: normal;
font-weight: normal;
font-size: 74%;
font-family: Tahoma;
text-align: right;
}
.p
{
padding: 5px;
font-family:Tahoma;
font-size:small;
direction:rtl;
height: 13px;
width: 207px;
text-align: center;
}
.p1
{
text-align: center;
font-family: tahoma;
font-size: small;
direction:rtl;

margin-right: 0px;
width: 221px;
min-height: 104px;
overflow: hidden;
height: 29px;
}
a:hover
{
color: #B2D487;
}
.divkol
{
padding: 5px;
width:928px;
margin:0 auto;
}
.div1
{
border-bottom: 2px solid #999999;
background-color:#0A0A0A;
height:39px;
text-align: right;
font-family: tahoma;
font-size: large;
}
.div2
{
border-bottom: 2px solid #FFFFFF;

height:118px;
text-align: right;
font-family: tahoma;
font-size: small;
}
.div3
{
background-color:#8FB235;
height:20px;
padding-bottom:12px;
padding-top:2px;
}
.divcenter
{
min-height: 104px;
overflow: hidden;
padding: 5px;

width:929px;
margin:0 auto;

}
.divsub
{
width:200px;
float:right;
height:auto;
text-align: center;
background-color:#FFFFFF;
}
.divasl
{
width:600px;
float:right;

text-align: center;

}
.divm
{

/* border-top-right-radius:10px;

border-top-left-radius:10px;*/
width:227px;
height:26px;
background-color:#FFFFFF;
text-align: center;
font-family: tahoma;
font-size: small;
margin:0 auto;

}
.diva
{

border: 1px solid #002731;
/* border-top-right-radius: 10px;

border-top-left-radius: 10px;*/
width:667px;
height:26px;
background-color:#FFFFFF;
text-align: center;
font-family: tahoma;
font-size: small;
margin-left: 0px;
margin-right: auto;
margin-top: 0;
margin-bottom: 0;
margin:0 auto;
}

.divsm
{
padding: 5px;
width:225px;
float:right;


}


.divmm
{
width:671px;
padding-right:15px;

float:right;
margin-left: 0px;
margin-right: 0px;
text-align: center;
font-size: small;
color: #FFFFFF;
}
.divmo1
{
width:222px;

padding-bottom:5px;
padding-left:5px;
padding-right:40;
padding-top:5px;
margin:0 auto;
border-right:1px none #000000;
border-left:1px;
min-height: 104px;
overflow: hidden;

}
.divmo2
{

padding: 5px;
width :657px;
min-height: 104px;
overflow: hidden;

}

.style3
{
font-size: small;
}


a:hover{color:#333;}


.style7
{
text-decoration: none;
}



.style10
{
text-align: center;
direction:rtl;
height: 13px;
width: 204px;
}




.style11
{
color: #FFFFFF;
font-size: small;
}



#form1
{
margin-bottom: 19px;
}



.style12
{
text-align: center;
direction: rtl;
height: 19px;
width: 219px;
font-size: small;
}

*{
margin: 0px;
padding: 0px;
font-family: Tahoma;
font-size: small;
color: #FFFFFF;
height: 0px;
}

Saber Mogaddas
یک شنبه 02 بهمن 1390, 20:45 عصر
سلام
دوست عزیز شما height رو به صورت پیش فرض 0 دادین و چون table height نداره پیشفرض 0 گرفته..
کافیه ستایل زیر رو بدون height:0; وارد کنید یعنی اینجوری :

* {
color: #FFFFFF;
font-family: Tahoma;
font-size: small;
margin: 0;
padding: 0;


}



موفق باشی..