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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

centreing layers 2

Status
Not open for further replies.

boyfromoz

Technical User
Feb 1, 2001
469
0
0
AU
How to a centre layers.

I usually build apges with tables, and have the maint able centred in case the client uses high res. that way the table will at least appear in the middle of the page, not the elft.

How can I set a layer up to do this?
 
As far as I have seen layers must have exact coordinates. If anyone does have a way to make layer positioning a variable or left/right/centered, I would be interested in finding out as well.

B-)
 
Hi

I came here hoping you had had an answer to your problem, as I have wondered the same thing & tried everything within my knowlege and power to achieve the same

GOOD LUCK :)
 
This seems to work

Create a style with the position left set to 50%

Attach it to the layer.

Bloody simple solution really and I'm a bit embarrased it took me so long to figure it out.

 
If you want the center of the layer to be in the center of the page you will need to create a formula that takes the height and wodth of the layer into account. Mike Barone
FREE CGI/Perl Scripts & JavaScript Generators
Ace PopUp Generator Software - Totally FREE
 
Thus not being able to have a truely centered layer. If only there were some way for the browser to tell the screen size of the user!
 
NIPPI

YOU BEAUTY !!!!
I see what you mean, so obvious, but THANKS for finding it.

Regards
Simon
 
OK. Fine tuned it.

(1)Create the layer. Delete in the property manager all the positioning stuff, left, width etc,
(2) Create a CSS style. Go to positioning
(3) Set your Placement/width at say, 90%
(4) Set your placement/left at HALF of the remaining %. In this case, half of 10%, or 5%.
(5) Apply it to your layer. It works for vertical postioning too.

Even easier? In the property manager set the layer width to 90%, and the layer left positioning at 5%.

Don't even need a style sheet.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top