Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-02-2007, 01:29 AM   PM User | #1
ikilledsanta
New Coder

 
Join Date: May 2005
Posts: 78
Thanks: 3
Thanked 0 Times in 0 Posts
ikilledsanta is an unknown quantity at this point
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.
ikilledsanta is offline   Reply With Quote
Old 06-02-2007, 03:45 AM   PM User | #2
koyama
Senior Coder

 
koyama's Avatar
 
Join Date: Dec 2006
Location: Copenhagen, Denmark
Posts: 1,246
Thanks: 1
Thanked 5 Times in 5 Posts
koyama will become famous soon enough
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?
koyama is offline   Reply With Quote
Old 06-04-2007, 08:08 AM   PM User | #3
ikilledsanta
New Coder

 
Join Date: May 2005
Posts: 78
Thanks: 3
Thanked 0 Times in 0 Posts
ikilledsanta is an unknown quantity at this point
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.
ikilledsanta is offline   Reply With Quote
Old 06-04-2007, 05:09 PM   PM User | #4
Arbitrator
Senior Coder

 
Arbitrator's Avatar
 
Join Date: Mar 2006
Location: Splendora, Texas, United States of America
Posts: 2,887
Thanks: 5
Thanked 186 Times in 183 Posts
Arbitrator is on a distinguished road
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.
__________________
Please for the love of god stop making IE. You current "browser"s cause me to cry every day. —Phil *
Arbitrator is offline   Reply With Quote
Old 06-10-2007, 07:56 PM   PM User | #5
ikilledsanta
New Coder

 
Join Date: May 2005
Posts: 78
Thanks: 3
Thanked 0 Times in 0 Posts
ikilledsanta is an unknown quantity at this point
Well I took it out of the table and it worked. Thanks for the help!
ikilledsanta is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:47 AM.


Advertisement
Log in to turn off these ads.