我已经通过将网址放到Dreamweaver中的链接字段上来制作一些链接图像,这应该是非常简单的......在代码中看起来像这样
<div id="fb">
<a href="http://www.facebook.com">
<img src="graphics/social graphics/facebook.gif" width="31" height="31" alt="Facebook Logo" />
</a>
</div>
但是当我在浏览器中预览时,整个图像不会变成链接,只有它的底部才会变成链接。因此,当我将鼠标悬停在图像上时,只有在图像的最底部才会变成一只手。关于为什么会发生这种情况的任何想法都将非常感谢!谢谢!
@charset "UTF-8";
* {
margin: 0px;
padding: 0px;
}
body {
margin:0 auto;
width:800px;
padding-top:10px;
}
#imagerow #studioimage4 {
float: left;
}
#main #imagerow div a #Todo1 {
float: left;
}
#social div {
width: 100px;
float: left;
}
#container #main #mainimage #rotxt a #studioimage4 {
float: left;
}
#container {
font-family: Georgia, "Times New Roman", Times, serif;
text-align: left;
color: #663300;
width: 800px;
}
#container #main #imgcontainer #social #tripadvisor {
width: 80px;
}
#footer #social #email .st_email_large {
}
#footer #social #email {
}
#container #main #imgcontainer #social {
padding-top: 165px;
}
#nav-menu {
padding-right: 65px;
padding-left: 65px;
}
#main p {
font-size: 0.9em;
font-family: Georgia, "Times New Roman", Times, serif;
padding-left: 1px;
}
#googlemap {
margin-bottom: -15px;
}
#reservations {
margin-top: -2em;
margin-bottom: -2em;
}
#main img {
float: right;
font-family: Georgia, "Times New Roman", Times, serif;
}
#container #main h1 {
font-size: 1em;
}
#header {
background: url(graphics/header.jpg) no-repeat;
height: 148px;
font-family: Georgia, "Times New Roman", Times, serif;
}
#navbanner {
height: 38px;
background: #f09911;
margin-top: 5px;
margin-bottom: 20px;
}
#nav-menu ul
{
list-style: none;
padding: 0;
margin: 0;
}
#nav-menu li
{
float: left;
font-size: 0.9em;
margin-left: 0px;
margin-bottom: 0;
padding: 0px 5px;
list-style: none;
display: inline;
}
#nav-menu li a
{
line-height: 2.3em;
float: left;
width: 120px;
color: #663300;
font-weight: bold;
text-decoration: none;
text-align: center;
padding-top: 2px;
}
#nav-menu li a:hover {
text-decoration:none;
font-weight: bold;
background: #FFF;
height: 38px;
}
#nav-menu li a.current {
text-decoration:none;
font-weight: bold;
background: #FFF;
height: 38px;
}
#container #main #imgcontainer #social .a2a_kit.a2a_default_style .a2a_dd {
color: #663300;
}
#imagerow {
clear: both;
font-family: Georgia, "Times New Roman", Times, serif;
width: 800px;
padding-top: 10px;
float: left;
}
#movers-row {
font-family: Georgia, "Times New Roman", Times, serif;
margin: -120px 0 0 120px;
;
}
#movers-row div {
width: 20%;
float: left;
}
#movers-row div img {
float: right;
}
#studiomovers-row {
overflow:auto
}
#studiomovers-row div {
width: 25%;
float: left;
}
#studiomovers-row img {
float: right;
}
#social {
font-size: 0.7em;
font-family: Georgia, "Times New Roman", Times, serif;
clear: both;
padding-top: 70px;
}
#container #main #imagerow a #Image6 {
float: left;
}
#social div {
width: 138px;
}
#social #fb {
width: 107px;
}
#social #email {
width: 40px;
height: 35px;
margin-top: -3px;
}
#mainimage img {
margin-left: 15px;
}
#container #main #rotxt {
font-size: 0.8em;
margin-top: 35px;
margin-bottom: -10px;
font-family: Georgia, "Times New Roman", Times, serif;
padding-left: 1px;
}
#social div p a {
text-decoration: none;
color: #663300;
}
#social div img {
float: left;
padding-right:8px;
clear: right;
}
#container #main ul li {
font-size: 0.8em;
}
#contactbanner {
float: left;
position: relative;
margin-top: -50px;
}
#main ul {
padding-left: 30px;
}
#main a {
text-decoration: none;
font-weight: bold;
color: #9848AD;
}
#telnos {
font-size: 0.9em;
}
#main h1 {
margin-top: 0px;
margin-bottom: 1em;
font-size: 1em;
}
#main #paleohori {
padding-right: 10px;
width: 378px;
margin-top: 155px;
padding-left: 250px;
}
#footer {
background: url(graphics/footer.jpg) no-repeat;
height: 242px;
margin-top: -130px;
}
.clear {
clear: both;
}
#social div p {
color: #663300;
padding-right: 4px;
padding-left: 1px;
position: relative;
}
#social #etxt {
color: #663300;
padding-right: 5px;
padding-left: 2px;
}
#social #twt {
width: 105px;
}
#social a img {
border-width: 0px;
}
我在整个网站上使用的CSS都在jsfiddle
答案 0 :(得分:0)
确保<div id="fb">
没有应用裁剪内容的样式(例如隐藏的溢出和较小的高度)。