Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    May 2003
    Location
    Mid-Cheshire, England
    Posts
    275
    Thanks
    1
    Thanked 3 Times in 3 Posts

    CSS query - w\idth?

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

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

    The file of the html and the css is attached (gallerytoo.txt - the upload of this file with the extension HTM was not allowed). On opening this file with the extension HTM there should be twelve containers in two columns of six within the main container. The 10th container appears to be present but has no discernible width. I am unable to see why this should be. I would very much appreciate some help with this difficulty.
    Attached Files Attached Files

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: CSS query - w\idth?

    Hi Malcolm

    This appears to be a CSS IE box hack.

    Basically the container is designed to be 93 pixels wide the width is a way for some browsers to stop at the position of the back slash and ignore it, other browsers ignore the backslash and read width. Most CSS hacks (work arounds) work by finding the character that will stop a particular browser from reading the next line of code in this case it is the .


    The code looks fine <img src=/S/yep.gif border=0 alt=yep width=15 height=15>
    Jerry

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: CSS query - w\idth?

    > The 10th container appears to be present but has no discernible width.

    The 10th container is this one?
    <hr><code>[*]<a class="gallery slidej" href="#nogo"><span>[img]../imagestoo/p13.jpg[/img]
    GIGA BYTEPhotographed by Angus Gray for Sandiway Golf Club</span></a></code><hr>
    There is a very minor but fatal typo in the width dimension:
    <hr><code>#container a.slidej {background:url(../imagestoo/p13_t.jpg); height:60px; width:93x;}</code><hr>
    Add the missing "p" and you should be good to go.

    In the future, you can spot this kind of problem by using Firefox's Errors Console. It will say something like unrecognized value for 'width' and give the line number in your page.

  4. #4
    3 Star Lounger
    Join Date
    May 2003
    Location
    Mid-Cheshire, England
    Posts
    275
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Re: CSS query - w\idth?

    Seems it's a case of never mind the CSS - just feel the width! {8;-))

    Thank you for reply and the explanation.

  5. #5
    3 Star Lounger
    Join Date
    May 2003
    Location
    Mid-Cheshire, England
    Posts
    275
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Re: CSS query - w\idth?

    Two cliches come to mind:

    `It's hard to teach an old dog new tricks' and `There's no fool like an old fool'.

    That's twice recently that I have been caught out by glaringly simple coding errors. Nevertheless I am very grateful that you were able to point to the specific error and also to point to a useful tool for future use. All is now well with the gallery.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •