图像链接在IE6中未修复 [英] the image link does not fixed in IE6

查看:80
本文介绍了图像链接在IE6中未修复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

facebook链接不能仅在IE6中固定在浏览器的中心页面中.
这是我的代码::::::::

the facebook link does not fixed in center page of the browsers only in IE6.....

here is my code:::::::

<table width="100%" border="0" cellspacing="0" cellpadding="0">
                           <tr>
                               <td align="center" valign="top">
                                   <div style="position: absolute; right: 0px; float: right; width: 0px;">
                                       <div class="sociallink">
                                           <a href="www.facebook.com">
                                               <img src="image/facebook.png" /></a><br />
                                           <a href="wwww.twitter.com">
                                               <img src="image/twitter.png" /></a><br />
                                           <a href="www.blog.com">
                                               <img src="image/blog.png" /></a>
                                       </div>
                                   </div>
                               </td>
                           </tr>
                       </table>



和我的CSS页面编码在这里



and my css page coding here

.sociallink
{
    position: fixed;
    top: 200px;
    right: 0px;
    background: url('../image/social_bg.png') no-repeat;
    padding: 35px 0px 5px 12px;
    height: 175px;
    margin-top: 10px;
}




请给我一个解决方案




please give me a solution

推荐答案

快速解决将内容放置在网页中心的问题(不使用表格-表格丑!") -div对于这种事情来说要好得多!):

For a quick solution to your problem of placing things in the centre of a web page (without using tables - tables are "ugh!" - div''s are so much better for this sort of thing!):

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
.CenterWrapper
{
    position:fixed;
    /*Use the "top" style here to set how far up/down the page you want - setting it to greater than 600px will result in many people never being able to see it due to the use of position: fixed; but that seemed to be what you wanted...*/
    top:100px;
    left:0px;
    /*width:100% so that the container is centering stuff for the whole page*/
    width:100%;
    margin:0px;
    padding:0px;
    height:auto;
    /*Makes the box inside centred*/
    text-align:center;
}
/*Used to wrap all your content so that all content is centred as a whole*/
.CenterInnerWrapper
{
    /*Resizes the box to the size of then content so that content is centred correctly*/
    width:auto;
    /*Makes the div display inline (but still as a block) so that the text-align property of parent element applies.*/
    display:inline-block;
    height:auto;
    position:relative;
}
.sociallink
{
    background: url('../image/social_bg.png') no-repeat;
    padding:0px;
    /*Use this to change the height of your centred box - i.e. the size of the images*/
    height: 175px;
    width:auto;
}
/*Makes the images resize to the size of the box - remove this to make images display at their original size - if you do so, set the height property of .sociallink to auto!*/
.sociallink img
{
    width:auto;
    height:100%;
}
</style>
</head>

<body>

<div class="CenterWrapper">
    <div class="CenterInnerWrapper">
           <div class="sociallink">
               <a href="www.facebook.com">
                   <img src="http://scienceroll.files.wordpress.com/2009/12/facebook2009-04-21-1240343633.jpg" /></a><br />
               <a href="wwww.twitter.com">
                   <img src="http://cdn.caughtoffside.com/wp-content/uploads/2011/05/twitter_logo_12.jpeg" /></a><br />
               <a href="www.blog.com">
                   <img src="http://1.bp.blogspot.com/_hsWThc1UE9o/TK7kodO8XcI/AAAAAAAAP1Y/hCOjfnJSAII/s1600/blog.jpg" /></a>
           </div>
     </div>
</div>

</body>




希望这会有所帮助,不要忘记将图片网址改回原来的样子,
埃德

更新了CSS注释-我不小心使用了"//"而不是"/* MYCOMMENT */"-这已得到纠正




Hope this helps, don''t forget to change your image URL''s back to what they were,
Ed

Updated CSS comments - I accidently used "//" instead of "/*MYCOMMENT*/" - this has been rectified


这篇关于图像链接在IE6中未修复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆