Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    May 2005
    Posts
    78
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Problem with overflow

    I have a div that gets changed frequently using JavaScript. The script is working perfectly, but for some reason when I add pictures to the div that are larger than the div itself, it completely ignores the overflow property.

    Here is the styling for the div:
    Code:
    #mainsec {
    height:100%;
    width:90%;
    text-align:center;
    overflow:auto;
    }
    It's inside another div, if that has anything to do with anything.

  • #2
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by ikilledsanta View Post
    I have a div that gets changed frequently using JavaScript. The script is working perfectly, but for some reason when I add pictures to the div that are larger than the div itself, it completely ignores the overflow property.
    Hmm... What browser is this happening in? Do you have a link?

  • #3
    New Coder
    Join Date
    May 2005
    Posts
    78
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by koyama View Post
    Hmm... What browser is this happening in? Do you have a link?
    Firefox. IE does the same thing, though.

    I'm making this on my computer, it's not on a server, although I can upload it, since it's only 1 file.

    Here it is:
    http://ikilledsanta.tripod.com/indextest.html

    You can tell that it's not done yet.

    This is going to be the Firefox version, so don't even worry about IE.

  • #4
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,302
    Thanks
    28
    Thanked 276 Times in 270 Posts
    I would start by adding a document type declaration to the top of your document to get it out of quirks mode:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    Afterward, I would validate your document using the W3C and/or Validome validators to ensure that it’s correct.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #5
    New Coder
    Join Date
    May 2005
    Posts
    78
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Well I took it out of the table and it worked. Thanks for the help!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •