English 中文(简体)
超文本视距
原标题:HTML div positioning off

我在地图上通过四点表示。

我有以下法典:

<div id="map" style = "background-image:url( map.gif );width:382px;height:524px;">

<DIV STYLE="position:absolute; top:222px; left:204px;">
<a href=""><img src="bullet.gif" border=0>Point</a>
</DIV>
</DIV>

我在我的网页上加上这部法律时,就没有列入地图,因此我增加了一个立场:相对

<div id="map" style = "background-image:url( map.gif );width:382px;height:524px;position:relative;">

现在,问题就在地图上,但从我最初想要的那边远。 是否有办法解决这一问题? 又 这些要点在不同浏览器中处于不同的位置。 是否有办法使职位在哪里标准化?

最佳回答

我只建议使用一个等级(而不是单管),也建议超期。

<div>
  <div>
  </div>
<div>

用途

<div style=...>     the map
</div>
<span style=...></span>   an overlayed rectangle
<span style=...></span>   an overlayed rectangle

这是你们的ok子吗? 如果不提出抗辩,将予以调整。

问题回答

well you may need to adjust the "top" and "left" values, since the "point" is now positioned absolutely relative to the "map" div. Check this out if it helps http://jsfiddle.net/DK9wT/6/





相关问题
CSS working only in Firefox

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....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签