CSS query - off topic?

  • Thread starter Thread starter Malcolm Walker
  • Start date Start date
M

Malcolm Walker

I would like to know what this line from a CSS photo gallery script does:

* html #container a.slidek {width:91px; w\idth:93px;}

Or your advice on where can I post to obtain this information would be
appreciated.
 
The line contains several 'hacks'.

The first one is the use of "* html". Of all browsers, IE is the only one
who will read this as a viable selector, while the others just ignore it,
since everyone knows that nothing on a web page can have an ancestor for the
<html> tag.

The next one is the use of "w\idth:93px;", which (I believe) is targeted at
IE5x and its broken interpretation of the box model. All browsers except
this will see width: 91px, and ignore the second specification. IE5 sees
the first *and* the second, resulting in the width of that specified element
being set to 93px not 91px for this browser only.

The selector itself says -

"For IE only, find the <a> tag with class="slidek" which is contained within
the #container element, and set its width to 91px UNLESS you are IE5, in
which case, set its width to 93px."

This is dangerous code, in my opinion, to fix something that would be much
better handled with IE conditional comments...
 
Murray - (The reply to you direct was carelessness and not intended)

Apologies for this tardy but sincere thank you for your reply and the
useful explanation therein.
I found that omitting the dangerous code results in the slide containers
being disrupted and reduced from twelve to three. And that was in
Firefox not IE. As I have no knowledge of CSS the IE conditional
comments to which you refer are are beyond me.

Thank you again, Malcolm
 
That's an interesting and kind response - thank you for the opportunity
to continue the thread.

FWIW you are welcome to see the `test' gallery at:
www.mewalker.co.uk/gallerytoo.htm.

The images are preliminary taken in autumn with the sun low and the
shadows heavy. They will be retaken in May.
Apart from the images have you any comments on the gallery and how it
could be improved?
 
Cute.

I don't think I would do it that way, but it's a clever application.

/* Remove the images and text from sight */
#container a.gallery span {position:absolute; width:1px; height:1px;
top:5px; left:5px; overflow:hidden; background:#fff;}

Why not just make them display:none?

/* Remove the images and text from sight */
#container a.gallery span { display:none; }
 
Cute? For interest you may wish to look at the source. How to Create a
Photographic Gallery Using CSS is at:
http://www.webreference.com/programming/css_gallery/index.html and the
author's Web site is at: http://www.cssplay.co.uk/
Why not just make them display:none?
I tried the above line and mouseover the thumbnails fails to display their images.
I don't think I would do it that way, but it's a clever application.
That begs the question as to how you would do it? {8;-))
 
For interest you may wish to look at the source.

Did you think I didn't?
I tried the above line and mouseover the thumbnails fails to display their
images.

Of course. You would have to change the rule for the hover correspondingly.
That begs the question as to how you would do it? {8;-))

I would do it the way I suggested.
 
&gt;Of course. You would have to change the rule for the hover correspondingly.

Then how would you have changed the rule for the hover correspondingly?

Murray wrote:

For interest you may wish to look at the source.



Did you think I didn't?



Why not just make them display:none?



I tried the above line and mouseover the thumbnails fails to display their images.



Of course. You would have to change the rule for the hover correspondingly.



I don't think I would do it that way, but it's a clever application.



That begs the question as to how you would do it? {8;-))



I would do it the way I suggested.
 
Back
Top