Topic: Positioning to Center (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=10691" title="Pages that link to Topic: Positioning to Center (Page 1 of 1)" rel="nofollow" >Topic: Positioning to Center <span class="small">(Page 1 of 1)</span>\

 
Skatefx
Bipolar (III) Inmate

From: Small Patch of Grass in CT
Insane since: Mar 2001

posted posted 03-13-2002 21:41

Im using the following code to align a paragraph:

code:
<div id="Layer1" style="position:absolute; left:250px; top:400px; width:440px; height:224px; z-index:1">



I wanted to know how to make this DIV aligned to the center?

u-neek
Bipolar (III) Inmate

From: Berlin, Germany
Insane since: Jan 2001

posted posted 03-13-2002 22:20

You can use this to center vertically and horizontally. But that doesn't work correct for Mac users.

Or visit glish or bluerobot.com (1, 2) for some other examples.

Or you don't use absolute positioning and place that layer into a table.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 03-14-2002 01:43

If you want to align a block-level object (such as a DIV or a P) to the center horizontally, set it's margin-left and margin-right values to "auto", and make sure you have a valid DOCTYPE tag at the start of your page. Unfortunately, that doesn't work in IE 5.

Skatefx
Bipolar (III) Inmate

From: Small Patch of Grass in CT
Insane since: Mar 2001

posted posted 03-14-2002 04:20

Thanks!

Ducati
Paranoid (IV) Inmate

From: in your head
Insane since: Feb 2001

posted posted 03-27-2002 16:54

Hey , if you use Dreamweaver there is a great extension for centering layer on Macromedia Site that you can use...it centers your layers on the screen depending on users resolutions and browser window size...

MAX



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu