OT - You've gotta love vb6 (HTML subthread)
- From: "mayayana" <mayayana1a@xxxxxxxxxxxxxx>
- Date: Sat, 17 Feb 2007 15:13:19 GMT
The Question:What's the matter with the IMG ALIGN attribute?
If you wanted to center a block element inside another block
element, let's say an image inside a <div>, how would you do
it without using the CSS text-align?
The Answer:
Set the left and right margins to auto, and give the block item
you want to center a specific height and width. I inserted the
text-align:center; to get IE to center it properly. That should
not have been in there. The proper code is below.
Or a wrapping table? Or a wrapping DIV? They
both have ALIGN attributes. I guess we're approaching
it differently. I generally write a page with no margins
or padding anywhere (which I think should be the default),
arrange things where I want them, and then adjust the
code where it doesn't work in IE or Mozilla.
It's amazing how many ways there often are to do the
same thing. But this gets back to why I don't use DOCTYPE.
The common browsers do a remarkable job at piecing
together a page, but I think it's safe to say that "webpage
rendering is not, by any means, an exact science". To
use DOCTYPE implies that it is.
We've wandered way off from VB here, though.
: I've also noticed in my server logs that IE6 on XP (especiallyI don't know. I get the impression that it's one of the 15
: with InfoPath, for some reason) has a nasty habit of requesting
: images, in general, over and over again.
What is InfoPath?
things that MS tries to sell to anyone who's sucker enough
to buy Office. Whatever it is, they add the name to the
userAgent string. (Microsoft is putting an increasing amount
of unrelated crap in the UA string, including *all* installed
versions of the .Net runtime, whether XP has SP2, etc.)
: It's common to see cases where IE6 has requested an image
: dozens of times within a few seconds. It gets a 304 back but
: just keeps requesting over and over.
I used to think that was someone that turned caching off in
their browser. But I noticed that if I turn caching off and
then try to use Google, Google stops working and presents
a message other than the standard Google webpage.
Turning cache off should only mean that the image
loads again fresh each time. The 304 response is telling
the browser that it already has the image. The server's
not deciding that. It gets it from the browser's inbound
header.
Again, my apologies about posting the wrong HTML.I think I'm going to take your word on that. I'd have
It now works as I intended.
to boot up a Windows Xtra Problems test system to
try it out. (I'm on Win98SE with IE 5.00.)
.
- References:
- Re: You've gotta love vb6
- From: Jim Carlock
- Re: You've gotta love vb6
- From: Bob Butler
- Re: You've gotta love vb6
- From: Jim Carlock
- Re: You've gotta love vb6
- From: mayayana
- Re: You've gotta love vb6
- From: Jim Carlock
- Re: You've gotta love vb6
- From: mayayana
- Re: You've gotta love vb6
- From: Jim Carlock
- Re: You've gotta love vb6
- Prev by Date: Re: Finding the default printer
- Next by Date: Re: Mapquest and Google Map
- Previous by thread: Re: You've gotta love vb6
- Next by thread: Re: You've gotta love vb6
- Index(es):
Relevant Pages
|