HTML Code ClinicDo you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
i tried specifying the position like that, but unfortunately they don't align in Firefox and Safari -if it lines up in one of them it's a few pixels of in the other and vice versa.
Also I want to make these dynamic layers, the small images will be rollovers and if you click them the corresponding big image will appear. The only way I found for this to work in html is dynamic layers.
So I am trying to put the layer in the table cell for everything to line up. Can you think of a better sollution?
Correct. Like I said earlier, you positioned the image in a fixed location, with the browser window's (0, 0) coordinate (the upper left hand corner) being the anchor point.
So, when you resize the browser, the image will stay put, but the rest of the content will move.
Instead, you could embed the image directly inside another table cell (I didn't really understand your explanation why you couldn't; you don't need a positioned image to create a roll-over) or look into other positioning options: http://www.w3schools.com/css/pr_class_position.asp
I figured it out. I just put the image in the table and create a rollover through swaping the image. I will re-upload the site as soon as I am done so that you can see.
I had to take out the doctype because it disabled my swap image command.
Maybe i just had the wrong doctype?
Is there anything else in my site that you see that needs changing? I am self-taught and i just pretty much figure things out as i go along so i have no idea if what i am doing is right. I appreciate any input.
quote:Is there anything else in my site that you see that needs changing?
That largely depends on whether you want to change it or not, and have the time to learn what to change.
However, if you want to build a site that remains easy to maintain now, and two years from now, you may want to a look at XHTML, CSS and DocTypes a little more. Those are important concepts to create fast rendering, easy to maintain and cross browser web sites. I haven't tried it, but I think I can rewrite your frontpage to only 30% of the current code, dropping 70% of the code, and thus wasted bandwidth....
But again, you have to consider for yourself if that's what you want. If it ain't broken, don't fix it.... ;)