<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Is there a CSS expert in the house?</title>
	<link>http://www.willmcgugan.com/2007/10/28/is-there-a-css-expert-in-the-house/</link>
	<description>Blog of Will McGugan</description>
	<pubDate>Thu, 20 Nov 2008 20:06:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Ralph Corderoy</title>
		<link>http://www.willmcgugan.com/2007/10/28/is-there-a-css-expert-in-the-house/#comment-9110</link>
		<dc:creator>Ralph Corderoy</dc:creator>
		<pubDate>Tue, 30 Oct 2007 11:37:25 +0000</pubDate>
		<guid>http://www.willmcgugan.com/2007/10/28/is-there-a-css-expert-in-the-house/#comment-9110</guid>
		<description>Will, it's a browser bug;  you were right.  That it occurs in browsers other than Firefox doesn't change that.  If the browser waiting until everything was loaded, all Javascript had run, and it had fathomed out everything's location before displaying anything to the user then it could position the scrollbar correctly.

Theoretically, there's no reason Firefox can't constantly monitor the anchor's position as it continues to build and display the page and, if the user hasn't manually altered the scroll position himself, maintain the anchor at the same point, i.e. the web page may grow off the top of the window but the only visible change would be the scrollbar.

So see if it's a Firefox bug and if any workarounds are mentioned.  If it's not a bug, raise one.  :-)</description>
		<content:encoded><![CDATA[<p>Will, it&#8217;s a browser bug;  you were right.  That it occurs in browsers other than Firefox doesn&#8217;t change that.  If the browser waiting until everything was loaded, all Javascript had run, and it had fathomed out everything&#8217;s location before displaying anything to the user then it could position the scrollbar correctly.</p>
<p>Theoretically, there&#8217;s no reason Firefox can&#8217;t constantly monitor the anchor&#8217;s position as it continues to build and display the page and, if the user hasn&#8217;t manually altered the scroll position himself, maintain the anchor at the same point, i.e. the web page may grow off the top of the window but the only visible change would be the scrollbar.</p>
<p>So see if it&#8217;s a Firefox bug and if any workarounds are mentioned.  If it&#8217;s not a bug, raise one.  :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://www.willmcgugan.com/2007/10/28/is-there-a-css-expert-in-the-house/#comment-9107</link>
		<dc:creator>Will</dc:creator>
		<pubDate>Tue, 30 Oct 2007 09:25:04 +0000</pubDate>
		<guid>http://www.willmcgugan.com/2007/10/28/is-there-a-css-expert-in-the-house/#comment-9107</guid>
		<description>Ted, I had a gazillion validation errors, and it turns out that TG was serving my templates as html even though my doctype said xhtml, plus some foolish bugs. It took a few hours to fix it, and it looks exactly the same. *sigh*

Steve, I figured it may be the images, so I made sure that my img tags had the image dimensions, but the problem still occurred. The CSS contains fixed sizes for some classes, but I don't know how to specify the dimensions in a div tag. I tried setting the style attribute in the tag, as well as overriding it in the CSS, but that didn't work either. :-(</description>
		<content:encoded><![CDATA[<p>Ted, I had a gazillion validation errors, and it turns out that TG was serving my templates as html even though my doctype said xhtml, plus some foolish bugs. It took a few hours to fix it, and it looks exactly the same. *sigh*</p>
<p>Steve, I figured it may be the images, so I made sure that my img tags had the image dimensions, but the problem still occurred. The CSS contains fixed sizes for some classes, but I don&#8217;t know how to specify the dimensions in a div tag. I tried setting the style attribute in the tag, as well as overriding it in the CSS, but that didn&#8217;t work either. :-(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.willmcgugan.com/2007/10/28/is-there-a-css-expert-in-the-house/#comment-9091</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Tue, 30 Oct 2007 03:33:10 +0000</pubDate>
		<guid>http://www.willmcgugan.com/2007/10/28/is-there-a-css-expert-in-the-house/#comment-9091</guid>
		<description>I've always thought it was caused by the delayed loading of images.  The structure of your page loads relatively quickly, jumping to the named anchor before the images have a chance to download.  As soon as an image finishes loading, it bumps everything down, causing you to move away from the anchor.

Maybe you can try explicitly setting the width and height of your images, that way the spaces are already filled in, regardless of whether they have downloaded or not.  Please post a followup if you can get it to work, I've always been annoyed at this behavior and I'm curious about the solution.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve always thought it was caused by the delayed loading of images.  The structure of your page loads relatively quickly, jumping to the named anchor before the images have a chance to download.  As soon as an image finishes loading, it bumps everything down, causing you to move away from the anchor.</p>
<p>Maybe you can try explicitly setting the width and height of your images, that way the spaces are already filled in, regardless of whether they have downloaded or not.  Please post a followup if you can get it to work, I&#8217;ve always been annoyed at this behavior and I&#8217;m curious about the solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ted Roche</title>
		<link>http://www.willmcgugan.com/2007/10/28/is-there-a-css-expert-in-the-house/#comment-9045</link>
		<dc:creator>Ted Roche</dc:creator>
		<pubDate>Mon, 29 Oct 2007 01:29:59 +0000</pubDate>
		<guid>http://www.willmcgugan.com/2007/10/28/is-there-a-css-expert-in-the-house/#comment-9045</guid>
		<description>It's worth your while to spend some time running the results through a validator like http://validator.w3.org/check?uri=http%3A%2F%2Fwww.becontrary.com to see what kind of code you can change and whether that makes the page behave a little better. For example, you might want to add an HTML opening tag to the top of the document ;)  Lots of times I've found incompliant code will work right _most_ of the time, but cause funny behaviors like this.</description>
		<content:encoded><![CDATA[<p>It&#8217;s worth your while to spend some time running the results through a validator like <a href="http://validator.w3.org/check?uri=http%3A%2F%2Fwww.becontrary.com" rel="nofollow">http://validator.w3.org/check?uri=http%3A%2F%2Fwww.becontrary.com</a> to see what kind of code you can change and whether that makes the page behave a little better. For example, you might want to add an HTML opening tag to the top of the document ;)  Lots of times I&#8217;ve found incompliant code will work right _most_ of the time, but cause funny behaviors like this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ephemient</title>
		<link>http://www.willmcgugan.com/2007/10/28/is-there-a-css-expert-in-the-house/#comment-9014</link>
		<dc:creator>ephemient</dc:creator>
		<pubDate>Sun, 28 Oct 2007 21:53:29 +0000</pubDate>
		<guid>http://www.willmcgugan.com/2007/10/28/is-there-a-css-expert-in-the-house/#comment-9014</guid>
		<description>Evil-ish, but I guess this might work, if run after the page is done loading: 
document.getElementById((/#([^#]+)$/.exec(document.location))[1]).scrollIntoView(true); 

This isn't just a CSS problem.  If the page layout changes because size-unspecified images load or the user resizes the window, the scroll anchor doesn't move either.</description>
		<content:encoded><![CDATA[<p>Evil-ish, but I guess this might work, if run after the page is done loading:<br />
document.getElementById((/#([^#]+)$/.exec(document.location))[1]).scrollIntoView(true); </p>
<p>This isn&#8217;t just a CSS problem.  If the page layout changes because size-unspecified images load or the user resizes the window, the scroll anchor doesn&#8217;t move either.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://www.willmcgugan.com/2007/10/28/is-there-a-css-expert-in-the-house/#comment-8999</link>
		<dc:creator>Will</dc:creator>
		<pubDate>Sun, 28 Oct 2007 16:52:18 +0000</pubDate>
		<guid>http://www.willmcgugan.com/2007/10/28/is-there-a-css-expert-in-the-house/#comment-8999</guid>
		<description>The CSS is definitely cached, but it still seems to happen. I'll do some experiments to try and verify it is the external stylesheets that are the root cause...</description>
		<content:encoded><![CDATA[<p>The CSS is definitely cached, but it still seems to happen. I&#8217;ll do some experiments to try and verify it is the external stylesheets that are the root cause&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Morrighu</title>
		<link>http://www.willmcgugan.com/2007/10/28/is-there-a-css-expert-in-the-house/#comment-8995</link>
		<dc:creator>Morrighu</dc:creator>
		<pubDate>Sun, 28 Oct 2007 16:00:51 +0000</pubDate>
		<guid>http://www.willmcgugan.com/2007/10/28/is-there-a-css-expert-in-the-house/#comment-8995</guid>
		<description>Hi,

We’re an open source gaming engine project that’s looking for python devs. If you or anyone you know is interested, please visit us at www.projectangela.org.

TIA,

M.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>We’re an open source gaming engine project that’s looking for python devs. If you or anyone you know is interested, please visit us at <a href="http://www.projectangela.org." rel="nofollow">http://www.projectangela.org.</a></p>
<p>TIA,</p>
<p>M.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: karl</title>
		<link>http://www.willmcgugan.com/2007/10/28/is-there-a-css-expert-in-the-house/#comment-8991</link>
		<dc:creator>karl</dc:creator>
		<pubDate>Sun, 28 Oct 2007 14:49:31 +0000</pubDate>
		<guid>http://www.willmcgugan.com/2007/10/28/is-there-a-css-expert-in-the-house/#comment-8991</guid>
		<description>Hi,

did you put a HTTP cache information on your CSS?
You can at least put 1 week or if not 1 month. Your CSS must certainly not evolve that much. 
The browser will cache the information and your CSS should not take time to download at the second reload. 

If you put your anchors in absolute positioning (I haven't looked at the details of your CSS), you might create issues indeed.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>did you put a HTTP cache information on your CSS?<br />
You can at least put 1 week or if not 1 month. Your CSS must certainly not evolve that much.<br />
The browser will cache the information and your CSS should not take time to download at the second reload. </p>
<p>If you put your anchors in absolute positioning (I haven&#8217;t looked at the details of your CSS), you might create issues indeed.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
