Jump to content

div Placing problem in wide screen and normal screen


chanchelkumar

Recommended Posts

Hi all,

 

Am trying to create page using div..

I am trying to place a div over another.. just like mapping..

This is what am trying to do..

my image

 .image
{
    width:737px;
height:494px;
    background-image:url(../images/map_2.jpg);

}

 

I have a map image and i positioned each point with a div..

.dott_14
{
width:20px;
height:20px;
position:absolute;
left: 190px;
top: 404px; cursor:pointer; cursor:hand;
}
.dott_17
{
width:20px;
height:20px;
position:absolute;
left: 207px;
top: 409px; cursor:pointer; cursor:hand;
}

 

this is good and in position in my normal screen.. but on wide screen the positions are away.. how can i correct this in both wide screen and normal screen..

 

thanks in advance..

Link to comment
Share on other sites

Are the points moving away or the background-image moving? How are they moving away? Try resizing the screen, does it affect the positions? Is it possible to provide an example? Your description is quite vague..

 

Maybe you can try adding overflow:auto on your main DIV... :S

Link to comment
Share on other sites

Just to clarify: the background image gets bigger as you expand the window?

 

To my knowledge, background images don't stretch to fill the available size, only tile. Maybe providing an example or your HTML/CSS code will help...

Link to comment
Share on other sites

thanks seanlim ..

 

i tried to zoom in my screen.. at that time my bg image get bigger..

 

<div class="image">
	  <div class="dott_14" ><a  onclick="balloon.showTooltip(event,'<span class=\'shopping\'>To North Sound/Leverick Bay</span>  ',0)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image2','','MAP/blue_second.gif',1)"><img src="MAP/blue_first.png" alt="" name="Image2" width="20" height="20" border="0" id="Image2" style="border:none;" /></a>
	  </div>
	  <div class="dott_17" ><a  onclick="balloon.showTooltip(event,'<span class=\'shopping\'>To North Sound/Leverick Bay</span>  ',0)" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image2','','MAP/blue_second.gif',1)"><img src="MAP/blue_first.png" alt="" name="Image2" width="20" height="20" border="0" id="Image2" style="border:none;" /></a>
	  </div>
	  </div>

 

this is the code...

 

Code for css...

 

.image
{
    width:737px;
   height:494px;
    background-image:url(../images/map_2.jpg);
      
}
.dott_14
{
   width:20px;
   height:20px;
   position:absolute;
   left: 190px;
   top: 404px; cursor:pointer; cursor:hand;
}
.dott_17
{
   width:20px;
   height:20px;
   position:absolute;
   left: 207px;
   top: 409px; cursor:pointer; cursor:hand;
}

Link to comment
Share on other sites

There.. resizing the screen and changing the zoom is quite different! I have never tried solving this problem before, though I have wondered how to :P

 

The em units probably will resize together with the page, even if the zoom is done by the browser. On the other hand, I think the pixel unit will remain unchanged/un-zoomed, as a pixel is still a pixel, whether zoomed or not.

 

This may wreck all your positionings but I would suggest giving the em units a shot.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.