2012-05-24 42 views
0

下面是我用于我的网站的CSS模板。当我尝试将我的徽标添加到我的div #title时,我只是遇到问题,只有一半图片显示(高度)。我认为我的边缘存在问题,但我无法弄清楚为什么图像不会显示整个高度(宽度看起来不错),无论我如何调整其大小或更改边距大小。图像不会完全显示

你可以建议的解决方案?

html { 
    overflow: hidden; 
    height: 99%; 
} 

body { 
    background: $ffffff; 
    height: 99%; 
    margin: 0; 
    padding: 0; 
    line-height: 150%; 
    text-align: center; 
} 

* { 
    font-size: 8pt; 
    font-family: Tahoma, Verdana, sans-serif; 
    color: #000000; 
    text-align: left; 
} 

/* === Containers === */ 

#mainContentArea { 
    margin: 0 auto 0 auto; 
    display: table; 
    height: 100%; 
    position: relative; 
    overflow: hidden; 
    width: 600px; 
} 

.link,.linkActive { 
    width:75px; 
    margin-right:10px; 
    float: left; 
    margin-top:24px; 
    text-align:center; 
    font-family:Georgia, "Times New Roman", Times, serif; 
    background-image:url(tab.gif); 
    position:relative; bottom:0px; 
} 

.link:hover { background-image:url(tab2.gif); } 

a { text-decoration:none; } 

.link a { 
    font-family:Arial, Helvetica, sans-serif; 
    font-size:12px; 
    font-weight:bold; 
} 

#linkGroup { 
    margin-right:10px; 
    height:40px; 
    width:600px; 
} 

#title { 
    width:230px; 
    height:40px; 
    margin-right:20px; 
    margin-top:15px; 
    font-family:Verdana, Arial, Helvetica, sans-serif; 
    font-size:20px; 
    font-weight:bold; 
    text-align:center; 
    float:left; 
} 

.contentTitle { 
    font-family:Verdana, Arial, Helvetica, sans-serif; 
    color:#213E74; 
    font-size:19px; 
    margin-left:15px; 
    margin-right:12px; 
    margin-bottom:12px; 
    width:573px; 
} 

.pageContent { 
    font-family: Arial, Helvetica, sans-serif; 
    color:#000000; 
    font-size:12px; 
    margin-left:20px; 
    margin-right:20px; 
    width:560px; 
} 


#blueBox { 
    position: absolute; 
    vertical-align: middle; 
    background-color:#E7EDF8; 
    width:600px; 
    clear:both; 
} 

#header { 
    width:600px; 
    height:20px; 
    background-color:#FFFFFF; 
    background-image:url(header.gif); 
    background-repeat:no-repeat; 
} 

#footer { 
    width:600px; 
    height:20px; 
    background-color:#FFFFFF; 
    background-image:url(footer.gif); 
    background-repeat:no-repeat; 
    text-align:center; 
    padding-right:10px; 
    color:#BDCDEC; 
} 

#footer a { 
    font-size:9px; 
    color:#BDCDEC; 
} 

#contentBox { margin-top:25px; } 

html, body { text-align: center; } 

p {text-align: left;} 
+0

多大的图像?如果它的高度大于40px,那么你的“高度”规则会将其切断。 –

+0

甚至当我设置的图像40PX它仍处于半被切断,我用尽编辑高度规则藏汉并没有什么 – user1413830

+0

这可能是我们需要看到更多的情况。你能发布我们可以看到它的URL吗? –

回答

1

删除margin-top: 15px;#title为我工作。

+0

真棒谢谢你! – user1413830

-1

删除

width:230px; 
    height:40px; 
从CSS

,并保持

<img src="image " width="" height=""></img>