开发者

Make a Dom element visible but don't take up space on the page?

What CSS will produce an element but the browser won't take it into account for laying out anything else? Is such a thing possible?

I wa开发者_JAVA技巧nt the bird and dog on this page to not affect the centering of the text. http://twitter-meme.appspot.com/

Some solutions that I don't like:

  • Make a single image and set it as background-image. (Then I end up with a big image as a background).
  • Absolutely position the text (Yuck)


You could use position:absolute on the two images by setting the parent div to position:relative and then positioning the images to left:0 and right:0 respectively.


Make the container have position: relative; and then absolutely position the images respective to the container.


on approach can be z-index.

It will have them floating so you can position them anywhere

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜