帮助图像方式向右移动

编程入门 行业动态 更新时间:2024-10-26 16:26:14
本文介绍了帮助图像方式向右移动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的图像应该位于中心的居中div中。 页面。它在IE7中看起来很好。但是在Firefox中,图像被推到了右边。 www.barmannphotography/index1-test.php 我试过添加显示:块;对div的指示,对它上面的div $ / $ 以及对包含div的指示,都无济于事。 我也试过在导航下方清除酒吧,并且没有 帮助。 作为背景,页面与 www.barmannphotography/index1.php 除了index1-test.php页面使用不同的导航栏。 带有旧导航栏的index1.php在IE7和 Firefox中都很好看。 可能导致Firefox将图像推送到 对吧? 感谢您的帮助。 Tim

I have an image that is supposed to be in a centered div in the center of a page. It looks fine in IE7. But in Firefox, the image is pushed way over to the right. www.barmannphotography/index1-test.php I''ve tried adding display:block; directives to the div, to the div above it and to the containing div, to no avail. I''ve also tried clearing below the navigation bar and that hasn''t helped either. As background, the page is identical to www.barmannphotography/index1.php except that the index1-test.php page uses a different navigation bar. The index1.php, with the old nav bar, looks fine in both IE7 and Firefox. What might be causing Firefox to push the image so far off to the right? Thanks for any help. Tim

推荐答案

文章 < 11**********************@k79g2000hse.googlegroups > ;, timmyb< tb ******* *@gmail写道: In article <11**********************@k79g2000hse.googlegroups >, timmyb <tb********@gmailwrote: 我的图像应该位于中心的居中div中。 页面。它在IE7中看起来很好。但是在Firefox中,图像被推到了右边。 www.barmannphotography/index1-test.php 我试过添加显示:块;对div的指示,对它上面的div $ / $ 以及对包含div的指示,都无济于事。 我也试过在导航下方清除酒吧,而且还没有帮助。 I have an image that is supposed to be in a centered div in the center of a page. It looks fine in IE7. But in Firefox, the image is pushed way over to the right. www.barmannphotography/index1-test.php I''ve tried adding display:block; directives to the div, to the div above it and to the containing div, to no avail. I''ve also tried clearing below the navigation bar and that hasn''t helped either.

你可以尝试更大的尺寸来获得底部保证金 #menuh-container { 字体大小:1em; 位置:相对; 顶部:0; 左:5 %; 宽度:90%; 保证金:10px 10px * 60px * 10px; 显示:块; } (对于可扩展性,btw ems优于px ...) - dorayme

You could try a bigger dimension for bottom margin in #menuh-container { font-size: 1em; position: relative; top:0; left: 5%; width: 90%; margin: 10px 10px *60px* 10px; display:block; } (btw ems would be better than px for scalability... ) -- dorayme

On Fri,2007年9月28日02:19:59 -0000,timmyb写道: On Fri, 28 Sep 2007 02:19:59 -0000, timmyb wrote: [...] http:// www .barmannphotography / index1-test.php [...] 作为背景,页面完全相同 www.barmannphotography/index1.php 除了index1-tes t.php页面使用不同的导航栏。 带有旧导航栏的index1.php在IE7和 Firefox中都很好看。 [...] www.barmannphotography/index1-test.php [...] As background, the page is identical to www.barmannphotography/index1.php except that the index1-test.php page uses a different navigation bar. The index1.php, with the old nav bar, looks fine in both IE7 and Firefox.

除了图片问题,您的导航还有两个问题 栏,您可能想要纠正。在Firefox中,''Gallery''仅链接 显示当鼠标位于其上半部分时的翻转颜色。在IE6 画廊子菜单根本不显示。 - 萨法拉(Stephen Morley) www.safalra/hypertext/html/

嗨Dorayme, 这确实解决了问题,但创造了另一个:页面看起来很好 在FF中,但是在IE7中,图片位于导航栏下方太远。在 任何事件中,我想我弄清楚我做错了什么 - 对于我的 更清晰的课程,我使用的是跨度而不是div。使用div似乎 来解决问题。 (尽管在IE7和FF渲染你建议改变的底部边缘的方式仍然存在差异。) 感谢您的帮助! Hi Dorayme, That did solve the problem, but created another: the page looks fine in FF, but in IE7, the picture is too far down below the nav bar. In any event, I think I figured out what I was doing wrong -- for my clearer class, I was using a span instead of a div. Using a div seems to have solved the problem. (Though there are still differences in the the way IE7 and FF render the bottom margin you suggested changing.) Thanks for your help!

更多推荐

帮助图像方式向右移动

本文发布于:2023-11-06 17:17:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1564305.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图像   方式

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!