Forums

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
    Posts
  • #33485
    XaviJr
    Participant

    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?

    #83247
    furrball1383
    Member

    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.

    #83158
    Raiden
    Member

    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 …

    #83139
    XaviJr
    Participant

    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.