Jump to content

Recommended Posts

Hello, everyone. I recently made a HTML page and I'd like you guys just to point out if I'm using the wrong tecnique for what I want to obtain since I'm a beginner and hence inexperienced. I think there's no need to share a code because I don't need anything specific so I'll explain it in words.

 

My page is visually split in two parts, left and right. Left side contains thumbnails of 4 images, and once clicked on a thumbnail, in the right part of the page appears a detailed real-size image and a bit of text different for each thumbnail. I made this in my own way so I'm not sure if this is a good way to go or, for example, if it generates too much unnecessary code. So, here's how I did it:

 

The left side is a simple relative div which contains 4 thumbnails. On the right side, though, there are 4 absolute divs placed one over another in which I put some text and real-size images. To each thumbnail I ascribed a behaviour show-hide element, so basically, when you click the first thumbnail, one absolute div (containing elements relative to the first thumbnail) appears while the other 3 get hidden. I repeated this action for every thumbnail.

 

So, is this okay or there's another more desired way to do it?

 

Link to comment
https://forums.phpfreaks.com/topic/257086-is-this-a-right-way-to-make-a-page/
Share on other sites

also load weight of the page should be considered (if thats the right name)

suppose you increase this page to have 20 images, and each large image on the right is say 800k thats a page with 16meg to load! not desirable at all. you could use iframe and avoid any overlaying of divs, and just use thumbnails to target the iframe. another alternative is a bit of javascript to update the large image src so it only loads the image needed(clicked on)

 

The left side is a simple relative div which contains 4 thumbnails. On the right side, though, there are 4 absolute divs placed one over another in which I put some text and real-size images. To each thumbnail I ascribed a behaviour show-hide element, so basically, when you click the first thumbnail, one absolute div (containing elements relative to the first thumbnail) appears while the other 3 get hidden. I repeated this action for every thumbnail.

 

LOL you jury rig like me.

 

I suggest that you go to http://www.dynamicdrive.com/ there is a java script that I got from there that I use.

It loads the thumb nails and when you click them they appear in their own div and I let php decide which pics and text to load and if you enter text the text will be under the pic, I have my text styled to be on the side. I can't remember the name of the one I use but you can look and see all kinds there. I'll see if I can find the name of the one I use and post it if I get a name.

 

As stated be very careful of absolute, load your site in firefox and use the control + & - keys to increase font size and try to tear the div up. See what happens.

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.