The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Strange positioning

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #33485

    This position i want to make is a little strange but i hope is possible.

    I want to make let’s say a 200px div starting in the center of the page minus 50px. Any ideia how can i achieve this?


    I’m not exactly sure what you mean by the minus 50 pixels but I believe you’re looking at either absolute positioning or relative positioning so you may want to read up on both and se if one fits your purpose.


    if you want to put the div in the center of the page you use

    margin: 0 auto;
    so im taking a guess that if you want it to be minus 50px
    you would do

    margin: 0 auto 0 -50;
    or something along the line … check it out … but i think you should try just 50 rather then -50 …


    i got it. i used left:50% and then set the margin-left to -50px. :)

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.