aliessayli2 wroteHaha did u see the picture I posted ? I did what u said and I needed this content to be exactly in the middle while it is still to the left
You should put your content in a DIV box, with a set width and height... something like that:
.box {
width: 200px;
height: 180px;
position: absolute;
left:0; right:0; bottom:0; top:0;
margin:auto;
}
body {
position:relative;
}
I know it's not very clear, but basically when a DIV is position:absolute and left,right,top and bottom set to 0 and margin set to auto it will be in the middle (vertical and horizontal) of the container, but the container must also be position:relative, I think.
Otherwise you can do a table and set vertical-position of the TD to middle.
If you just want to horizontally align, I think margin:auto; should be enough, or even text-align:center.
PS: please, please, please, in the JavaScript, when you have variables, don't call them x and y (except if they're coordinates), call them user and password instead, to avoid confusion.