Absolute coords on centered image.

S

simast

Here is what i need:

I would like to have some sort of base image that is big and i center
it on the screen. Then i would like to position several other smaller
images on top of that centered big image. The problem is that i need
to use pixels to set positions for those small images and how can i
acomplish that? Note that those positions must be absolute to base
image. That is x=100 and y=100 will position inside base image
(100,100) and not inside browser window coordinates.
And i would prefer to use <div> instead tables if it is possible...
 
K

Kris

Here is what i need:

I would like to have some sort of base image that is big and i center
it on the screen. Then i would like to position several other smaller
images on top of that centered big image. The problem is that i need
to use pixels to set positions for those small images and how can i
acomplish that? Note that those positions must be absolute to base
image. That is x=100 and y=100 will position inside base image
(100,100) and not inside browser window coordinates.
And i would prefer to use <div> instead tables if it is possible...

<div class="gallery">
<img class="primary" ..>
<img class="secondary first" ..>
<img class="secondary second" ..>
<img class="secondary third" ..>
</div>

#gallery {
width: 500px;
margin: 0 auto;
position: relative;
}

..secondary {
position: absolute;
}

..first {
left: 10px;
top: 10px;
}

..second {
right: 10px;
bottom: 10px;
}

etcetera...
 
K

Kris

Kris said:
<div class="gallery">
<img class="primary" ..>
<img class="secondary first" ..>
<img class="secondary second" ..>
<img class="secondary third" ..>
</div>

This would even make it more simple.

<div class="gallery">
<img ..>
<div class="thumbnails">
<img class="first" ..>
<img class="second" ..>
<img class="third" ..>
</div>
</div>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top