Simple TABLE alignment question

January 9, 2010 at 01:54:39
Specs: Win XP SP3, 4 Go
I'm designing a simple web photo gallery using tables.

Why ? Because i want the photos to have a transparent frame around them and to sit next to each other horizontally.

Right now, i made this one table for 1 photo and i duplicated this table HOPING that it will align horizontally, but of course it does not. My goal is to display 4 photos horizontally if the person is 1024x768 and more photos horizontally if the person has a higher resolution.

I know that if i put the pictures thumbnails alone one after the other, i will achieve that goal, the browser will put as many pictures as possible on the same horizontal line before starting another line, but i want to achieve that with the transparent frame i made around the picture.

So if you know how to solve this, i'm all ears !!!

Thank you in advance.

Here's a temporary link to show you what i have done so far :

See More: Simple TABLE alignment question

Report •

January 9, 2010 at 13:48:16
to answer your question use this instead:

<table id="Table_01" cellspacing="0" cellpadding="0" border="0" style="float:left">

but i think you need to use div or li tags or both, what you doing is unstable. also try using border instead of your background image its much more optimised

Report •

January 9, 2010 at 20:52:00
Thank you, you were right.

It worked by adding : style="float:left"

But, i do not understand what you meant by "unstable"

And what is the "border" instead of my background picture you were talking about ?

Report •

January 11, 2010 at 02:06:21
Ok, i need help again on the same case.

Since these tables are now placed one after the other (the amount of tables per line varies with the screen resolution)..How can i center the first picture table so it is aligned with my title rectangle on the top ? (Important: It will be aligned only at the resolution of 1024x768 since the title at the top has the attribute align="center").

Thanks again in advance.

Report •

Related Solutions

January 11, 2010 at 23:38:31
Ah well...nevermind....

I guess i was just making it too hard for myself.

I just discovered "visual lighbox" and i'm gonna use this instead...way less manual operationsfor me......ony a few cosmetic arrangements to the ready made html gallery.

Report •

Ask Question