css bug in IE: circumvention, anybody?

E

Els

Greg said:
like, say, netscape v4? Are you telling me those have become so rare I
should no longer bother? I'd like that. :)

1) indeed, you shouldn't bother (personal opinion though)
2) even NN4 understands enough CSS to get a background picture to
display.
 
L

Lauri Raittila

Not too usual, but they do handle CSS way much better. I doubt there will
be any exeptions, IE3 and NN2-3 might work better with your try, but they
are pretty dead...

I don't know about IE4, but I doubt it has serious bug here...
like, say, netscape v4? Are you telling me those have become so rare I
should no longer bother? I'd like that. :)

When you do it right way, all you can lost is clipping, and tiling. Does
it really matter if those don't work in NN4. If you want, you can look it
in NN4 and then hide css if it looks bad.

OTOH, using good HTML makes it work better on some other browsers.
 
G

Greg N.

Lauri said:
And very nice indeed.

hey, thanks! :)
Is it application, in sence that you have some program
that you use to output it? I would be really interested...

The mechanics are all coded in PHP. I run all pages through the
interpreter locally, and upload the resulting HTML.

The intent is to keep the source as simple as possible. My pages use a
very limited number of php functions and a very limited set of html. My
source code for a typical page looks like this:
--------------------------------------------------------
<?php
$h1 = "header 1 text";
$h2 = "header 2 text";
$h3 = "header 3 text";
?>
<?php include "header.ph" ?>
<p>some text
<?php img('img/050521/i2436.jpg', 'class=right') ?>
<h4>a h4 title</h3>
<p>some more text
<?php img('img/050521/i2436.jpg', 'class=left') ?>
<p>again some more text
<?php banner('img/050522/i2442.jpg') ?>
<p>and again some more text
<?php include "trailer.ph" ?>
--------------------------------------------------------

My php functions and includes do all the back-breaking work, like
determining the image height and width, finding out if a large version
of the thumbnail exists, inserting the appropriate link to the blow up
page.
 
G

Greg N.

Lauri said:
Of course, you could do it so that snipping happens from both ends, if
the most important part is in the middle, using CSS.


how would you do that?
 
L

Lauri Raittila

how would you do that?

Using negative margins, for basically:

a {display:block;overflow:hidden;text-align:center;}
img {margin:0 -100px}

<a><img></a>

On wide screen it won't be starting from left, trough. For that, more
complex structure is needed:

div {overflow:hidden}
a {display:block;width:<img-size+100px>;align:center;}
img {margin-left:-100px}

<div><a><img></a></div>

For IE, you need to set width:100% here and there.

URL:
http://www.student.oulu.fi/~laurirai/www/css/clipimage/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top