I have a complex background image and images, that should be on exact positions of the background image.
How can I organize web page?
I can’t use absolute positions, because I need to organize background to view it nice on any monitor, any resolution and any browser. It can be aligned to center or smth else.
Web page can be written just with Javascript or with a library like JQuery.
Here’s an example of what kind of web page according to background image and images organization on it I’d like to have.
http://desandro.com/portfolio/
(background picture and points on it)
Thanks in advance.
EDIT
I’ll add my answer in comments to the question.
Background will be a set of circles as matrix (m*n), taking an image(one circle) and repeating it on the page or it would be one background image with all this circles on it. But some of this circles should be separate img, not in the background part, so user could click on them, but he should not fill any difference, as if all circles are of the same type, just some of them click-able. If I could arrange it, so buttons could randomly change, it would be great. Hope, I explained all clearly.
I think you need to take a different look at how to approach this, some of the points in your question seem misguided.
If it is a portfolio design, like the one linked, then you need to be aware of 2 things:
Another thing to note is that the linked example uses
canvasfor drawing the points due to the lines connecting each one. Canvas makes this easy by being dynamic but is not supported in IE without the use of plugins. However, if you don’t need to change these points very often then you can achieve a similar effect with just images and CSS.The rest of this answer assumes you are using HTML4/XHTML. The linked example uses HTML5 (incorrectly in places), but without a specific requirement to use this technology I am assuming you are not using HTML5.
To start, consider each image and notes as a standalone block of content, contained in an individual div. As mentioned previously, the screenshot is a content image and should have it’s own img tag. I’d also argue that the notes are a list of specific points, so they should be marked up as such.
Mark-up: done. You can use this for each piece and simply replace the content as appropriate. If you think the order of the points is significant, replace the
ulwith anol.Next you want to think about the CSS. This will only be the basics to get you started, it should be enough to point you in the right direction. You need to set
div.articleto be positioned relatively in order to allow absolute child elements to be positioned relative to the top-left corner of that particular entry. Also set the wrapperdivwidth, height and center it (also set theimgdimensions). Finally, you need to prepare thelinotes for positioning.Now it is just a case of plotting the points for each li. Use your image editor to work out the top left position (in pixels) of each point, then set each
li.noteXas appropriate.This should be enough to put you on the right path. Once you get your head around this you can start adding background-images for the notes and any JavaScript to add tooltips and so on. As for using multiple entries on a page, give each
div.articlea unique id and use that to target thelimore specifically.EDIT: Live example with a tiny bit of JS to show hovers. Excuse the lack of actual images, the horrid colours should be enough of a visual 😉