Page Goes On an On Forever, using CSS

This is a discussion on "Page Goes On an On Forever, using CSS" within the Web Page Design section. This forum, and the thread "Page Goes On an On Forever, using CSS are both part of the Design Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old Nov 9th, 2007, 18:06
New Member
Join Date: Nov 2007
Location: US
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Page Goes On an On Forever, using CSS

http://www.lincolnsafari.org/registration.html

I used CSS to do this page, but as you can see, the orange background, goes on forever, and ever. I've tried changing the height of the containerr div, but it doesn't fix it. Any help?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Nov 9th, 2007, 18:10
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Page Goes On an On Forever, using CSS

Remove

HTML: Select all
<?xml version="1.0" encoding="utf-8"?>
as IE doesn't like it and validate.

You have 375 errors!

It might solve your problem, it might not but at least we'll be working will validated code.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Nov 9th, 2007, 18:23
New Member
Join Date: Nov 2007
Location: US
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Page Goes On an On Forever, using CSS

I removed that line, but it's still not changing the height. Is the doc type right? I never really understood which doc type I should be using.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Nov 9th, 2007, 18:26
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Page Goes On an On Forever, using CSS

The doctype is fine ... just get rid of those errors.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Nov 9th, 2007, 19:19
New Member
Join Date: Nov 2007
Location: US
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Page Goes On an On Forever, using CSS

I found a better doc type to use from alistapart.com
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

And now there a far fewer errors. But the page is still going on forever in safari and IE, but not in firefox?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Nov 9th, 2007, 19:33
Aso's Avatar
Aso Aso is offline
Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,324
Blog Entries: 2
Thanks: 9
Thanked 48 Times in 45 Posts
Re: Page Goes On an On Forever, using CSS

But you still have errors! As karinne said, fix them! It's a lot easier to solve the problem if you can conclude it's not a parsing error
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Nov 9th, 2007, 19:36
New Member
Join Date: Nov 2007
Location: US
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Page Goes On an On Forever, using CSS

Line 38, Column 6: end tag for element "HEAD" which is not open.
Line 39, Column 159: document type does not allow element "BODY" here.

i still get these 2 errors, and I don't know how to fix them? The head tag is open, and that is the line that closes it. And then the body tag is right below it. I thought this is fine?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Nov 9th, 2007, 20:02
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,761
Thanks: 0
Thanked 14 Times in 14 Posts
Re: Page Goes On an On Forever, using CSS

Under your doctype, you need an <html> tag.
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Nov 9th, 2007, 20:18
New Member
Join Date: Nov 2007
Location: US
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Page Goes On an On Forever, using CSS

Oh wow, can't believe I missed that. Ok added that in, but still the 2 errors.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Nov 9th, 2007, 20:42
Reputable Member
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Page Goes On an On Forever, using CSS

not sure if i got all your code correctly but try this on your page for validation.

HTML: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<link rel="stylesheet" href="http://www.lincolnsafari.org/safari.css" type="text/css" media="screen">
<link rel="stylesheet" href="http://www.lincolnsafari.org/print.css" type="text/css" media="print">
<title>Lincoln Safari: Registration</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body onload="MM_preloadImages('images/SafariDetails_r5_c3_f2.gif','images/SafariDetails_r6_c3_f2.gif','images/SafariDetails_r7_c3_f2.gif')">
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old Nov 9th, 2007, 20:47
New Member
Join Date: Nov 2007
Location: US
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Page Goes On an On Forever, using CSS

Hey that got rid of the errors, but now onto the Big problem....why is my page so long? arg.

Thanks for helping fix the errors though.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old Nov 9th, 2007, 20:54
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,761
Thanks: 0
Thanked 14 Times in 14 Posts
Re: Page Goes On an On Forever, using CSS

I dont really understand your question... Your page is long because the content is stretching it...
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old Nov 9th, 2007, 20:59
New Member
Join Date: Nov 2007
Location: US
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Page Goes On an On Forever, using CSS

In Safari, the orange background goes on for a long time. And in IE, if you try to print the form, it tries to print 180 pages.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14  
Old Nov 9th, 2007, 21:39
Highly Reputable Member
Join Date: Jul 2006
Location: Devon, England
Posts: 565
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Page Goes On an On Forever, using CSS

What does this mean

Quote:
This Page Is Tentatively Valid HTML 4.01 Transitional
Not properly validated....a temporary fix?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15  
Old Nov 9th, 2007, 21:44
Highly Reputable Member
Join Date: Jul 2006
Location: Devon, England
Posts: 565
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Page Goes On an On Forever, using CSS

Quote:
Originally Posted by tbuck View Post
In Safari, the orange background goes on for a long time. And in IE, if you try to print the form, it tries to print 180 pages.
I think you'll find if you look in IE7, it does the same as in Safari
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #16  
Old Nov 10th, 2007, 00:16
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Page Goes On an On Forever, using CSS

Quote:
Originally Posted by tbuck View Post
I found a better doc type to use from alistapart.com
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

And now there a far fewer errors. But the page is still going on forever in safari and IE, but not in firefox?
That's not a better doctype! Keep the strict doctype

Choosing the best Doctype for your website
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #17  
Old Nov 10th, 2007, 03:15
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Page Goes On an On Forever, using CSS

Yup, Karinne is right! Always use HTML 4.01 Strict... It is the best to use.

Say Karinne, what is the HTML 4.01 Strict equivalent to target="_blank"? It does not validate and I do not know of another way to open a new window with a link...
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #18  
Old Nov 10th, 2007, 10:18
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Page Goes On an On Forever, using CSS

Quote:
Originally Posted by swagner View Post
Say Karinne, what is the HTML 4.01 Strict equivalent to target="_blank"? It does not validate and I do not know of another way to open a new window with a link...
Some items are deprecated because they are bad coding practices. For example, <font> is deprecated in favour of CSS, which is much more efficient. There's nothing wrong with changing font styles, but <font> is an inefficient method.

Other items, such as target="_blank" are deprecated because they are fundamentally bad. It's maddening when a website takes control of the browser; it feels like a violation!

Designers use target="_blank" because they don't want users to leave their website. This is stupid for two reasons:
  • It's much easier for a user to return to your site by using the "back" button. Opening a new window will likely make it harder to find your site again!
  • Users will leave if they want to, no matter how hard you try to stop them. You can either let them do it -- a cordial goodbye -- or you can fight them. Fighting them won't stop them leaving, but it will make them hate you.
In cases where you want a little pop-up window, you need to use javascript pop-ups. But why not keep everything on one page? You can use javascript to show/hide elements. Remember that the content should remain accessible when javascript is disabled (so make things visible by default, then hide them with JS).

Beware that pop-up windows are blocked by many browsers.

Last edited by MikeHopley; Nov 10th, 2007 at 10:27.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote