div problem! the text is fix HELP!

Discussion in 'CSS' started by cjheyheh, Dec 7, 2008.

  1. #1
    Guys,
    I need help look at this screenshots..

    here in window mode you can see that the text are aligned..
    [​IMG]
    wtf, here in full screen what the heck look at the text!
    [​IMG]
    look at my source code here..
    [​IMG]

    can anyone help me with this div problem!
    onegai shimasu! please! HELP!

    website: etchel.net76.net
     
    cjheyheh, Dec 7, 2008 IP
  2. belkocrnic

    belkocrnic Active Member

    Messages:
    107
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #2
    That problem is because you are using position: absolute. That command positioned the text left:...px and top:...px from the browser window
     
    belkocrnic, Dec 8, 2008 IP
  3. cjheyheh

    cjheyheh Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    so how can i solve my problem?
     
    cjheyheh, Dec 8, 2008 IP
  4. Divisive Cottonwood

    Divisive Cottonwood Peon

    Messages:
    1,674
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I can't recommend an absolute fix because I can't see all the code.

    Firstly, try not to use relative / absolute positioning in your code unless you really have to.

    You'll often find it in code for a menu, but you should avoid it elsewhere as float takes care of positioning well enough.

    Your position absolute is positioned to the relative div above it in cascading order

    For instance:

    body {

    }

    #content {
    position : relative;
    margin : 0 auto;
    }

    #content #wrapper {
    position : absolute;
    top : 300px;
    left : 300px;
    }

    So the wrapper is positioned against the #content div not the body...

    And as the #content is centred (by using margin: 0 auto) it will be in a different position depending on the size of the browser

    I think that makes sense
     
    Divisive Cottonwood, Dec 8, 2008 IP