General Question

howsueisnow's avatar

How can I position divs inside a table which centers when user resizes the browser?

Asked by howsueisnow (19 points ) November 15th, 2009

I’ve my website made up in a table. I want to position text over some images. I did this by positioning divs.

Everything was great however I set my margins as auto as I want the page to center when the user resizes their browser. Obviously if divs are set to a specific position they’ll stay and not move with the rest of the content.

I got around this by setting my margin-right: auto, and then inputting my margin-left with pixels.

My problem is sometime when I open the page everything is in the right position, other times the text has jumped up or down.

What is the right way to do this (keeping in mind my main layout is in tables not divs), I can’t seem to find any correct help on the internet?

Observing members: 0 Composing members: 0

6 Answers

poisonedantidote's avatar

I cant quite visualize your problem just from reading this. are the files online anywhere? is there any code i can look at?

OutOfTheBlue's avatar

Using % rather than sizes may fix your problem, but you need to know, it is only going to get as big as your Body…

howsueisnow's avatar

Yep you can see the problem at [...removed...]

The divs I’m talking about are the titles of below the pictures frames. I’m viewing it now and it’s working fine, however sometimes it seems to have a mind of it’s own.

You can see it happening if you click on the first picture frame [...removed...] the text has moved.

I’ve done a simple page jump in that example, however I don’t understand why that should effect the position of the divs?

Thanks for your help guys!

aphilotus's avatar

I also see some odd blue borders around some of the table-entries. Is that the intended effect?

Also, I like the background images- interesting layering of the stained-paper looking thing over the victorian-wallpaper-looking thing.

markyy's avatar

Check your pm.

five99one's avatar

I’m not entirely sure why you’re putting divs inside a table?

On an unrelated note, your site takes a long time to load. And I have highspeed internet. I’d recommend toning down your image use/image sizes.

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther