在 Dreamweaver 中使整个图像成为链接
我通过将网址放入 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保
没有应用裁剪内容的样式(例如隐藏溢出和较小的高度)。
make sure the
<div id="fb">
doesn't have a style applied that is cropping the content (such as an overflow hidden and a smaller height).