I m 试图将1#div
方框放在2个小型#divs
在其内部,在屏幕/网页的准确中间,最好是贯穿所有决议和IE 6 +,什么是最佳办法?
margin:0 auto;
似乎从横向来看,但从纵向来看究竟是什么?
I m 试图将1#div
方框放在2个小型#divs
在其内部,在屏幕/网页的准确中间,最好是贯穿所有决议和IE 6 +,什么是最佳办法?
margin:0 auto;
似乎从横向来看,但从纵向来看究竟是什么?
如果你知道你想要集中的那部分内容的规模,你可以确定以下中心:
#centered {
position : absolute;
left : 50%;
top : 50%;
width : 150px;
height : 200px;
margin : -100px 0 0 -75px;/*set the left and top margins to the negative of half the element s width and height (respectively)*/
background : #000;
}
请注意,该要素的母体须有<编码>>>>>>>>>> 代号(>,除<代码>外的代号>:
#container {
position : relative;
width : 100%;
height : 100%;
border : 1px solid #000;
}
http://jsfiddle。
P.S. I checked and this works in I.E. 6.
我刚刚读过这一条,即关于集中点的trick滴,它采用假装元素提供了有趣的做法,但你可以很容易地将这些要素添加到标记中(它赢得了语气,但会发挥作用)。
I have a gradient image as a PNG (no transparency) in a web-page. By taking a screenshot of Chrome showing the page and cropping the image from the page, I see the exact same colors are drawn as the ...
I need to determine the version of Mobile Internet Explorer on a Windows Mobile 6.1 device. So that I can report the same user-agent string as is being used by Mobile Internet Explorer. The user-...
I m developing a front-end to a Rails application. In cross-browser testing, I immediately discovered that Internet Explorer (apparently all modern versions, but at least IE 7 and IE 8) is not ...
I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....
I m having trouble with my local development environment where IE (6 through to 8) is only part loading JavaScript/CSS files. It throws random errors at random places in jquery.min.js every time I ...
Ok, I m stumped. Basically, this script works fine in FF, but not in IE (6,7 or 8) - in which it returns an "Object doesn t support this property or method" error. Any ideas?: function ...
So I ve got a menu with a hover/selected state and it loads fine in IE6/IE7. However when I scroll down the page and put the element outside of the viewport and then back in I get a broken image! I ...
I ve built a shop with tons of JS running. One of the pieces of the cart, is a zip code field which is required to calculate shipping cost. This works fine going through the cart. Now clicking ...