2010-06-23 75 views
2

好我的主頁http://www.stat-me.com我有一個鏈接,當按下時激活一些jquery。CSS不適用

我的CSS就可以說margin-bottom:517px;但它並不影響它

它與文字XXXXXXXXXXXX的鏈接,如果你去到實際的網頁,你會看到,它附着在左下角下透明條,那裏

很抱歉,但因爲我是新用戶,我不能張貼代碼,因爲它在它的超鏈接,但你可以去上面的鏈接,點擊查看源代碼,你會看到它。

Basicly如果你點擊新聞提要看來,這就是我希望發生的一次點擊XXXXXXXXX鏈接

<?php 
session_start(); 

if (isset($_SESSION['id'])){ 
    header ('Location: dock.php'); 
} 
?> 
<!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"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>Stat - Me</title> 
<link href="style/main.css" rel="stylesheet" type="text/css" /> 
<link rel="icon" href="http://www.stat-me.com/images/sm_shortcut.jpg" type="image/x-icon" /> 
<link rel="shortcut icon" href="http://www.stat-me.com/images/sm_shortcut.jpg" type="image/x-icon" /> 


<script src="js/jquery/jquery-1.4.2.js" type="text/javascript"></script> 
<script language="javascript" type="text/javascript"> 
// run the function below once the DOM(Document Object Model) is ready 
$(document).ready(function() { 
    // trigger the function when clicking on an assigned element 
    $(".toggle").click(function() { 
     // check the visibility of the next element in the DOM 
     if ($(this).next().is(":hidden")) { 
      $(this).next().show(); // slide it down 
     } else { 
      $(this).next().hide(); // hide it 
     } 
    }); 
}); 
</script> 


<style type="text/css"> 
<!-- 


a:link { 
    /* Applies to all unvisited links */ 
    text-decoration: none; 
    color:   #F00; 
    } 

a:visited { 
    /* Applies to all visited links */ 
    text-decoration: none; 
    color:   #F00; 
    } 
a:hover { 
    /* Applies to links under the pointer */ 
    text-decoration: underline; 
    color:   #F00; 
    } 
a:active { 
    /* Applies to activated links */ 
    text-decoration: underline; 
    color:   #282828; 
    } 
img{ 
    border-style:none; 
} 

.topbar { 
    background-color: #282828; 
    height: 45px; 
    width: 100%; 
    position: fixed; 
    left: 0px; 
    top: 0px; 
} 

.bottombar { 
    background-color: #282828; 
    height: 45px; 
    width: 100%; 
    position: fixed; 
    left: 0px; 
    bottom: 0px; 
    filter:alpha(opacity=85); 
    -moz-opacity:0.85; 
    -khtml-opacity: 0.85; 
    opacity: 0.85; 
    /*margin-bottom:5px; */ 
    z-index:444; 
    /*padding-bottom: 20px;*/ 
} 
.login { 
    color: #F00; 
    text-align:center; 
} 

.hiddenDiv{ 
    display:none; 
    height: 22.5px; 
    width: auto; 
    position: fixed; 
    bottom: 44px; 
    filter:alpha(opacity=85); 
    -moz-opacity:0.85; 
    -khtml-opacity: 0.85; 
    opacity: 0.85; 
    z-index:444; 
} 

#news_feed_img{ 
    height: 25px; 
    width: auto; 
    position: fixed; 
    right: 0px; 
    bottom: 47px; 
    filter:alpha(opacity=85); 
    -moz-opacity:0.85; 
    -khtml-opacity: 0.85; 
    opacity: 0.85; 
    /*margin-bottom:5px; */ 
    z-index:444; 
    /*padding-bottom: 20px;*/ 
} 


/* BELOW CSS BELONGS TO LOG IN JQ */ 
.secondehiddendiv{ 
    display:none; 
    margin-top:40px; 
    margin-left:480px; 
} 

.chat-bubble { 
    background-color:#242424; 
    border:2px solid #F00; 
    line-height:1.3em; 
    margin:10px auto; 
    padding:10px; 
    position:relative; 
    text-align:center; 
    width:217px; 
    -moz-border-radius:10px; 
    -webkit-border-radius:10px; 
    -moz-box-shadow:0 0 5px #888888; 
    -webkit-box-shadow:0 0 5px #888888; 
} 

.chat-bubble-arrow-border { 
    border-color: transparent transparent #F00 transparent; 
    border-style: solid; 
    border-width: 10px; 
    height:0; 
    width:0; 
    position:absolute; 
    bottom:163px; 
    left:179px; 
} 

.chat-bubble-arrow { 
    border-color: transparent transparent #242424 transparent; 
    border-style: solid; 
    border-width: 10px; 
    height:0; 
    width:0; 
    position:absolute; 
    bottom:160px; 
    left:179px; 
} 

.log_in_img{ 
    margin-left:117px; 
} 

/*END OF LOG IN CSS*/ 

--> 
</style> 
</head> 

<body bgcolor="#FF8C8C"> 
<div class="topbar"> 
    <table width="100%"> 
    <tr> 
    <td width="50%"> 
<a href="http://www.stat-me.com/"><img src="http://www.stat-me.com/images/logo_bar.png" alt="Stat-Me.com" width="202" height="45" /></a> 
</td> 
    <td width="19%">&nbsp;</td> 


    <td width="11%" class="login"><a href="#">LOG IN</a></td> 





    <td width="20%"><table align="right" cellpadding="5" cellspacing="5"> 
     <tr> 
     <form action="http://www.stat-me.com/member_search.php" method="post" name="main-search" id="main-search"> 
      <td><input name="searchb" type="hidden" value="true" /> 
      <input type="text" name="search" size="22" value="" /></td> 
      <td><input type="image" src="http://www.stat-me.com/images/search_mag.png" alt="search" /></td> 
     </form> 
     </tr> 
    </table></td> 
    </tr> 
</table> 
</div> 


<div align="center"> 
<img src="images/INDEX-QUESTIONARE.png" border="0" align="middle" usemap="#Map" /> 
<map name="Map" id="Map"> 
    <area shape="rect" coords="23,143,385,384" href="fregister.php" alt="click here to register" /> 
    <area shape="rect" coords="432,142,781,391" href="fabout.php" alt="What is stat me . com" /> 
</map> 
</div> 
<div class="bottombar"> 
<div align="center" style="color:#F00"><p>  
     &copy; Stat-Me.com Copyright 2010. All Rights Reserverd. 
</p></div>  

</div> 

<span class="toggle" style="display:block; margin-bottom:517px;"> 

<a href="#">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</a> 

</span> 

<div class="secondehiddendiv"> 
<div class="chat-bubble"> 
    <h1 style="color:#F00">LOG IN!</h1> 
<form name="login" method="post" action="scripts/login_parse.php"> 
    <table style="margin-left:-5px; text-align:right; color:#F00;"> 
    <tr> 
     <td>Email:</td> 
     <td><input name="email" type="text" size="17" /></td> 
    </tr> 
    <tr> 
     <td>Password:</td> 
     <td><input name="pword" type="text" size="17" /></td> 
    </tr> 
    </table> 

    <div class="log_in_img"> 
    <input type="image" src="http://www.stat-me.com/images/log_in_jq.png" alt="LOG IN" /> 
    </div> 
</form> 

    <div class="chat-bubble-arrow-border"></div> 
    <div class="chat-bubble-arrow"></div> 

</div> 
</div> 




<span class="toggle" style="margin-left:40%; margin-bottom:30%;"> 
<div id="news_feed_img"> 
<a href="#" style="cursor:pointer;"> 
<img src="http://www.stat-me.com/images/bar_news_feed.png" alt="News Feed" width="98" /> 
</a> 
</div> 




</span> 
<div class="hiddenDiv" style="border-top:#F00 3px solid; border-left:#F00 3px solid; border-right:#F00 3px solid; border-bottom:#F00 3px solid; background-color:#484848; width:92.2%;"> 

<table width="90%"> 
    <tr> 
    <td> 
     <marquee scrolldelay="157"><font color="#FF0000"><b>June 21 - 12:00 AM - PM Messaging Re-Enabled! ...June 17 - 12:00 AM - New LOOK !!!! ...April 21 - 12:00 AM - FRIENDS FUNCTIONALITY WORKING !&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;...April 21 - 12:00 AM - PM MESSAGING NOW AVALIBLE !&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></font></marquee> 
    </td> 
    </tr> 
</table> 

</div> 
</body> 
</html> 
+0

如果使用101010按鈕將其格式設置爲代碼,則可以發佈代碼。那麼它應該被接受,網址和所有。 – Thomas 2010-06-23 17:27:21

+0

仍然不會讓我說它 哎呀!您的編輯無法提交,因爲: *我們很抱歉,但作爲垃圾郵件防範機制,新用戶最多隻能發佈一個超鏈接。獲得10點聲望發佈更多超鏈接。 *我們很抱歉,但作爲垃圾郵件防範機制,新用戶不允許發佈圖片。獲得10個聲望來發布圖像。 – DonJuma 2010-06-23 17:30:13

+0

你現在有你的10分。但是,如果您只需將代碼縮進至少4個空格(或選擇它並單擊101010按鈕),則代碼將被格式化,並且SO會接受它。 – user113716 2010-06-23 17:32:27

回答

1

<跨度上的登錄script>標記是內聯元素。對於要應用的餘量,您還需要display: block;

+0

好了,所以我沒有 <跨度類=「肘節」風格=「顯示:塊;邊距:517px;」> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ,它仍然不工作 – DonJuma 2010-06-23 18:15:28

1

問題是具有517px邊距的元素實際上是跨度。這意味着它是一個內聯元素。如果您替換div標籤的span標籤,則邊距將起作用,向下推動底部或給出跨度在css中的display:block屬性,這意味着它現在將受到邊距的影響。內聯意味着如果它本身沒有結構屬性,它就會坐在它的父容器內。

不知道這是你想要的,如果你想要的話。但試試看吧。

+0

好了,所以我沒有<跨度類=「肘節」的風格=「display:block; margin-bottom:517px;」>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx它仍然不起作用 – DonJuma 2010-06-23 18:17:01

+0

試試我給你的其他解決方案。用div元素替換span。這應該工作.. – 2010-06-23 19:20:22