Odd CSS positioning question

I’ve changed my homepage to an all-CSS layout, just to see if I could. I’ve tested it using Opera 6.03 and IE5.5 on WinXP, and it looks fine.

Except … on my local machine, no problems, but once FTP’d to my webhost, the page appears too big when viewed in Opera. That is, the horizontal scroll bar appears.

I wondered if this was related to using nested DIVs, but I don’t think it can be, or else it would also look this way on my local machine. On my local machine, using the same browser, there’s no scroll bar.

So why might a web page look ‘bigger’ when uploaded than on my local PC?

IE6 and works fine for me.

I’m a bit suspect on this line.

<img src=“sidebar.png” alt="" height=“26” width=“122” align=“absmiddle” />   <strong>Crusoe takes a trip</strong> | matt kilcast’s homepage

I didn’t know you could align=“absmiddle” I thought middle was the value and not absmilddle.

Also, I can’t see what the /> does in the <img tag. I think the / may be superfluous, but I can’t see how that would affect the page in the manner you are describing.

How do you have IE 5.5 on XP?

Good call, Snetho. It’s IE6; I have IE5.5 at work and was getting confused.

Caught@Work, the W3C validator claims that only ‘top’, ‘bottom’ and ‘middle’ are valid, but I’ve seen other resources that also allow ‘absmiddle’, ‘text-bottom’, ‘text-top’ and ‘baseline’. Viewed with IE5.5 ‘absmiddle’ aligns the middle of an image with the middle of adjacent text. Opera 6.03, my preferred browser, seems to interpret it as ‘middle’. It’s a bit of a fudge, but works.

The < /> is required in XHTML; all tags must be closed. Any img and br tags have to be closed in this way, for example – e.g. <br />. It doesn’t affect browser rendering.

The only thing I can think of that would change on FTP is if you used binary mode instead of ASCII mode to transfer a file, or maybe since your charset is utf-8 you should use binary mode. Well, I have no idea, but you probably thought of this anyway.

By the way, your page looks great in Netscape (Win 98). Kudos! Except I don’t think it likes the absmiddle value. Where did you get that? The specs list only bottom, middle, top, left, and right.

Thanks, Achernar. I don’t think my host likes files FTP’d in binary mode, but I might try it.

Thanks for the Netscape compliment BTW - I would test it but hated Netscape 6 so much that when I installed XP I never re-installed Netscape. ‘Absmiddle’ is listed in some documents as an acceptable value - e.g. this site lists the treatment of middle vs absmiddle in different browsers, and it’s listed in this HTML reference guide.

I’m a bit confused myself over why some sites claim it’s usable and others don’t. Anyone shed any light on it?

The W3C is official. You want to check the XHTML standard. IIRC, it’s a simple extension of HTML 4.01, so you may need to check that as well.

BTW, Netscape 6 sucks, but you may want to check out Mozilla, as version 1.0 is finally out.

I’ve just changed it to avoid absmiddle; I found that a combination of vertical-align, line-height and image align got the same result without warnings from the W3C validator.

Ta!

I personally like Netscape 6 (and I’m liking Netscape 7). Relevant to this discussion, I believe that it’s more standards-compliant than any of the other browsers mentioned here so far, with the exception of Mozilla.

The W3C HTML 4.01 specs are what I mentioned earlier, and they don’t recognize absmiddle, not even as deprecated. I’m not sure what effect you’re trying to achieve with that image, exactly, but I guess it looks fine how you have it.

I was trying to line up the middle of the image with the middle of the adjacent text (rather than lining the bottom of each up). There’s no real need to, I just like the way it looks like that.