• CSS query – width?

    Author
    Topic
    #439248

    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.

    Viewing 1 reply thread
    Author
    Replies
    • #1049203

      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 yep

      • #1049338

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

        Thank you for reply and the explanation.

    • #1049236

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

      The 10th container is this one?[indent]


      [*]
      GIGA BYTEPhotographed by Angus Gray for Sandiway Golf Club


      [/indent]There is a very minor but fatal typo in the width dimension:[indent]


      #container a.slidej {background:url(../imagestoo/p13_t.jpg); height:60px; width:93x;}


      [/indent]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.

      • #1049342

        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.

    Viewing 1 reply thread
    Reply To: CSS query – width?

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: