PDA

View Full Version : Hic... Bác nào cao thủ CSS ( div) giúp em dzới



tonhoasen
29-04-2008, 16:35
Chào cả nhà!

Trang này mình cắt = div... nhưng bị lỗi : chạy trên IE thì không sao....nhưng chạy trên Firefox thì nó bị lỗi ( menu tự nhien chạy bên phải... còn nội dung thì chạy xuống dưới.. không biết bị gì luôn)

Mấy bác coi dùm mình dzới.

Nội dung file HTML :
<div id="left_content">

<ul class="services">
<li><a href="#" class="nav_services">+ Full Lace Wigs</a></li>
<li><a href="#" class="nav_services">+ Hair Information</a></li>
<li><a href="#" class="nav_services">+ Knotting</a></li>
<li><a href="#" class="nav_services">+ Density</a></li>
<li><a href="#" class="nav_services">+ Textures and Curl Type</a></li>
<li><a href="#" class="nav_services">+ Colour </a></li>
<li><a href="#" class="nav_services">+ Cap Base </a></li>
<li><a href="#" class="nav_services">+ How to Measure</a></li>
</ul>

</div>

<div id="right_content">

<div class="title">About Us<br />

</div>


<div class="news_content">
<b>Write some text for this page to fit in this section so the page doest scroll</b>.<p>A full lace wig gives you the freedom to part your hair allowing A full lace wig gives you the freedom to part your hair allowing A full lace wig gives you the freedom to part your hair allowing A full lace wig gives you the freedom to part your hair allowing A full lace wig gives you the freedom to part your hair allowing </p><p>A full lace wig gives you the freedom to part your hair allowing A full lace wig gives you the freedom to part your hair allowing A full lace wig gives you the freedom to part your hair allowing A full lace wig gives you the freedom to part your hair allowing A full lace wig gives you the freedom to part your hair allowing</p><p> A full lace wig gives you the freedom to part your hair allowing A full lace wig gives you the freedom to part your hair allowing A full lace wig gives you the freedom to part your hair allowing A full lace wig gives you the freedom to part your hair allowing A full lace wig gives you the freedom to part your hair allowing
</div>

<div class="people"></div>

</div>

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

Còn đây là nội dung trong file CSS:

.navigation{
padding-left:0px;
margin:auto;
background-color:#000000;
width:773px;
}
.navigation ul
{
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight:bold;
text-decoration: none;
width:773px;
margin: 0px;
padding:0px;
list-style: none;
}
.navigation li
{
text-align:center;
display: inline;
text-align: center;
padding: 0px;
float: left;
}
.navigation li a
{

height:25px;
color: #676073;
float: left;
margin: 0px;
padding:6px 12px 0px 12px;
text-decoration: none;
background-color:#000000;
}

.navigation li a:hover
{
color:#FF8502;
background-color:#000000;
}
.navigation li.current a
{
color: #FF8502;
float: left;
margin: 0px;
padding:6px 12px 0px 12px;
text-decoration: none;
background-color:#000000;
}


#center_content{
clear:both;
width:773px;
height:auto;
background-color:#f2f2f2;
}
#left_content{
float:left;
width:153px;
height:auto;
padding:0px;
font-size:11px;
color:#333333;
padding:0 0 0 0;
}
#right_content{
width:620x;
float:left;
height:auto;
padding:0px;
font-size:11px;
color:#ffffff;
margin-top:0px;

}

Quartermain
02-05-2008, 17:14
#center_content cái này mình ko thấy trong file HTML. Mà thẻ div của bạn chia thế ko ổn đâu. Vì mình thấy cái .navigation="773px" rồi còn đâu. Trong khi đó thì cái #left_content="153".
Bạn xem lại cách chia DIV đi

2_lua_IT
03-05-2008, 23:39
code từa lưa hột dưa. Chẳng ai định nghĩa class trong a cả bạn ơi. Kiếm 1 site nào tham khảo đi. Tui thấy mấy topics trước cũng có bàn về vấn đề này, ráng lục lại xem.

trouble_maker
04-05-2008, 09:47
mình view thử lên IE7 và FF vẫn OK đấy, mình ko có IE6 nên cũng chưa biết chạy ra sao, nhưng cẩn thận với thằng IE6.

2_lua_IT
05-05-2008, 12:08
mình view thử lên IE7 và FF vẫn OK đấy, mình ko có IE6 nên cũng chưa biết chạy ra sao, nhưng cẩn thận với thằng IE6.

Khoảng cách giữa IE7 và Firefox chỉ 1cm thôi bạn ơi. Khác biệt rõ rệt chỉ là IE6 thôi.