Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9
  1. #1
    Senior Member Andrew Yurlov's Avatar
    Join Date
    Apr 2011
    Location
    Portland, OR
    Posts
    1,306
    Member #
    27566
    Liked
    181 times
    While I was making my site I encountered a problem with my div positioning. Everytime I make a website I test it out in different resolutions and I usually do the Ctrl + Mouse scroll to see how it would look like. This time when I did the Ctrl thing part of the page moved around based on the amount I scrolled. I've tried doing a lot of variations of the position: absolute; etc. I've also did quite a bit of reasearch concerning this and found nothing helpfull. If someone can help me with this problem I would be really greatfull. I've zipped up some files with all the code from the whole site to look at if thats helps. If someone decides to edit my code and zip it up for me please make sure to comment on what you have changed so that I can learn from my mistakes for the future.

    Thanks a lot to those who help.

    EDIT: I forgot how to upload a .zip file can someone help me out?
    Artificial intelligence is nothing compared to natural stupidity -Someone

    Design is a funny word. Some people think design means how it looks.
    But of course, if you dig deeper, itís really how it works.
    -Steve Jobs



  2.  

  3. #2
    Senior Member Andrew Yurlov's Avatar
    Join Date
    Apr 2011
    Location
    Portland, OR
    Posts
    1,306
    Member #
    27566
    Liked
    181 times
    Never mind I got the file uploaded here.
    Artificial intelligence is nothing compared to natural stupidity -Someone

    Design is a funny word. Some people think design means how it looks.
    But of course, if you dig deeper, itís really how it works.
    -Steve Jobs



  4. #3
    Senior Member Andrew Yurlov's Avatar
    Join Date
    Apr 2011
    Location
    Portland, OR
    Posts
    1,306
    Member #
    27566
    Liked
    181 times
    YES!!!! I somehow managed to got it fixed. I don't know how to close this thread so can a moderator please do it for me.
    Artificial intelligence is nothing compared to natural stupidity -Someone

    Design is a funny word. Some people think design means how it looks.
    But of course, if you dig deeper, itís really how it works.
    -Steve Jobs



  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    We can't actually close them as such (at least I can't).

    But just to make this thread worthwhile, let us know how you got your problem fixed.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    Senior Member Andrew Yurlov's Avatar
    Join Date
    Apr 2011
    Location
    Portland, OR
    Posts
    1,306
    Member #
    27566
    Liked
    181 times
    Quote Originally Posted by TheGAME1264, post: 208038
    We can't actually close them as such (at least I can't).

    But just to make this thread worthwhile, let us know how you got your problem fixed.
    Well instead of using the this code...

    #the div{
    margin-left: 500px;
    position: relative;
    }

    I switched it with this...

    #the div{
    [COLOR=rgb(255, 0, 0)]left:[/COLOR] 500px;
    position: [COLOR=rgb(255, 0, 0)]absolute[/COLOR];
    }

    I replaced the margin-left with just left and changed position: relative to absolute.
    Artificial intelligence is nothing compared to natural stupidity -Someone

    Design is a funny word. Some people think design means how it looks.
    But of course, if you dig deeper, itís really how it works.
    -Steve Jobs



  7. #6
    WDF Staff George Dolidze's Avatar
    Join Date
    Apr 2011
    Location
    Irvine, CA
    Posts
    2,487
    Member #
    27540
    Liked
    416 times
    Quote Originally Posted by Andrew Yurlov, post: 208130
    Well instead of using the this code...

    #the div{
    margin-left: 500px;
    position: relative;
    }

    I switched it with this...

    #the div{
    [COLOR=rgb(255, 0, 0)]left:[/COLOR] 500px;
    position: [COLOR=rgb(255, 0, 0)]absolute[/COLOR];
    }

    I replaced the margin-left with just left and changed position: relative to absolute.
    Could have done the same with relative.
    My freelancer website: DolidzeDesign



    You only need a parachute if you plan on skydiving twice.

  8. #7
    Senior Member Andrew Yurlov's Avatar
    Join Date
    Apr 2011
    Location
    Portland, OR
    Posts
    1,306
    Member #
    27566
    Liked
    181 times
    Quote Originally Posted by George Dolidze, post: 208141
    Could have done the same with relative.
    I don't think so because the whole point of a position: absolute is to make the div stay inside the parent div at all times.
    Artificial intelligence is nothing compared to natural stupidity -Someone

    Design is a funny word. Some people think design means how it looks.
    But of course, if you dig deeper, itís really how it works.
    -Steve Jobs



  9. #8
    WDF Staff George Dolidze's Avatar
    Join Date
    Apr 2011
    Location
    Irvine, CA
    Posts
    2,487
    Member #
    27540
    Liked
    416 times
    Quote Originally Posted by Andrew Yurlov, post: 208143
    I don't think so because the whole point of a position: absolute is to make the div stay inside the parent div at all times.
    Yes, the first parent element, which means that it takes the div out of the normal flow of the page.
    I think that's the opposite of what you were saying. Relative, on the other hand, is for positioning an element relative to its normal position.
    My freelancer website: DolidzeDesign



    You only need a parachute if you plan on skydiving twice.

  10. #9
    Senior Member aeroweb99's Avatar
    Join Date
    Feb 2008
    Location
    Port Huron, Michigan
    Posts
    1,037
    Member #
    16468
    Liked
    1 times
    Learn to use floats too. They will expand and contract nicely, stay inside the parent div, and you won't have height problems as you might with absolute divs. Good practice for when you do navbars too.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:52 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com