Fixed position

Discussion in 'HTML & Website Design' started by lxiaol, Jan 5, 2008.

  1. #1
    On my website I'm making, the content is placed a little more to the left when there's a vertical scrollbar. And when there's no scrollbar, it's positioned a little more to the right.
    Is there a way to not let the content 'move' when there's a scrollbar?
     
    lxiaol, Jan 5, 2008 IP
  2. EIx

    EIx Peon

    Messages:
    170
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    smaller width
     
    EIx, Jan 5, 2008 IP
  3. chrissyj

    chrissyj Peon

    Messages:
    56
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    To set a smaller width, enclose the entire section that you don't want to "move", as follows:

    <div width="95%">
    HTML IN HERE THAT YOU DON'T WANT TO MOVE
    </div>

    Good luck!
     
    chrissyj, Jan 5, 2008 IP