Click here to Skip to main content
15,921,250 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have several < div > , i want to pick them
in special place but the problem with
position:absolute;
top:350px;
left:300px;
is >>>> when i used it and put them in correct place when i zoom in
the screen going to left side .

how can i to put my div to correct place and when i zoom out the div to pick center
or when i zoom in div to pick center .

I want to the div always see in center place with special position .
Posted

Instead of what you got there put the following (just make sure to define a width). And don't use position here.

C#
margin-left: auto;
margin-right: auto;
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900