PC Review


Reply
Thread Tools Rate Thread

CSS query - off topic?

 
 
Malcolm Walker
Guest
Posts: n/a
 
      31st Jan 2007
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.



 
Reply With Quote
 
 
 
 
Murray
Guest
Posts: n/a
 
      31st Jan 2007
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
--------------
MVP FrontPage


"Malcolm Walker" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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.
>
>
>



 
Reply With Quote
 
Malcolm Walker
Guest
Posts: n/a
 
      3rd Feb 2007
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

Murray wrote:
> 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...
>
>

 
Reply With Quote
 
Murray
Guest
Posts: n/a
 
      3rd Feb 2007
Where do we go from here, then?

--
Murray
--------------
MVP FrontPage


"Malcolm Walker" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
> Murray wrote:
>> 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...
>>
>>



 
Reply With Quote
 
Malcolm Walker
Guest
Posts: n/a
 
      4th Feb 2007
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?

Murray wrote:
> Where do we go from here, then?
>
>

 
Reply With Quote
 
Murray
Guest
Posts: n/a
 
      4th Feb 2007
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; }

--
Murray
--------------
MVP FrontPage


"Malcolm Walker" <(E-Mail Removed)> wrote in message
news:uA364B$(E-Mail Removed)...
> 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?
>
> Murray wrote:
>> Where do we go from here, then?
>>
>>



 
Reply With Quote
 
Malcolm Walker
Guest
Posts: n/a
 
      4th Feb 2007
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/programm...ery/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;-))

Murray wrote:
> 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; }
>
>

 
Reply With Quote
 
Murray
Guest
Posts: n/a
 
      5th Feb 2007
> 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.

--
Murray
--------------
MVP FrontPage


"Malcolm Walker" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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/programm...ery/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;-))
>
> Murray wrote:
>> 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; }
>>
>>



 
Reply With Quote
 
Malcolm Walker
Guest
Posts: n/a
 
      9th Feb 2007
&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.

 
Reply With Quote
 
Murray
Guest
Posts: n/a
 
      12th Feb 2007
#container a.gallery:hover span { display:inline; }


--
Murray
--------------
MVP FrontPage


"Malcolm Walker" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> >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.
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to link topic headers in picture to topic header in word doc Ranusirus Microsoft Word Document Management 1 21st Jan 2009 06:52 AM
CSS query - off topic? Thread incomplete? Malcolm Walker Microsoft Frontpage 2 11th Feb 2007 11:04 PM
disabling the resize feature More options There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic. There was an error processing your request. Please try again. wanwan Microsoft VB .NET 3 2nd Feb 2007 05:25 PM
Order of insert/update/delete help topic query emma middlebrook Microsoft ADO .NET 1 12th Aug 2003 12:25 PM
Conversation Topic view and Thread-Topic different to Subject headers Mr B Microsoft Outlook Discussion 0 18th Jul 2003 11:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:08 AM.