Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

centering

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I need a command to centre the content of a table. Sounds simple, except some of the objects (jpgs gifs) in the table use absolute positioning, so when centering the table they aren't considered as part of the cell and get left in their original position. I've had to use absolute positioning becuase some of these item over-lap; if I use relative positioning and move them around a bit I can get themn where I want in Normal view, then everything goes wrong in preview.

I'm sure there must be a way of doing it - I have found the command line with controls everything in the table using absolute positioning (it seems to ignore any "centre" commands I try) - so I CAN actually move everything by a number of pixels; I wonder if there's some HTML I could use that would consider the complete width of the screen (for all resolutions) then take that value away from the width of the table, divide it by two and then move it (which could be absolute positioning) by that number of pixels.

It's really frustrating - I can click and drag the table and all its contents all over the page, but can specify a centre command!

Please, please help - my website's nearly finished except for this!
 
Sounds like your using percentage for your table widths. If u set a pixel width, say 750, you wont have that problem.
 
Whether you're saying that I should be able to use relative positioning to get the pictures where I want if I set cell widths and the table width as pixel amounts or that setting the width as a pixel amount will make the table centre when it's set in absolute positioning, it doesn't make any difference.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top