Help please

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Marcotte

    Help please

    I'm not much of a CSS guru, and I'm having a spot of difficulty.

    I am attempting to create a table with alternating background colors
    for comments made on my web page. The table is generated on the fly,
    and I am attempting to define and apply a style to each cell. the
    styles are "look0" and "look1".

    "look1" works fine.

    "look0" will not work no matter what I tried. In desperation, I
    deleted "look0" and replaced it with a copy of "look1". Then I changed
    the name of the style to "look0".

    I'm still getting plain, unformatted text.

    An example of the problem is here:



    If anyone could view the source and explain to me in small words what
    is going wrong, I'd appreciate the help.
  • John Marcotte

    #2
    Re: Help please

    >[color=blue]
    > Next time you're posting sample pages with half-nude women, put up a
    > warning. Some people are trying to help you from their office, and we
    > don't have cubicles in Europe. It's not that we're prude, but pages like
    > this wouldn't look like we're helping out people in HTML/CSS related
    > subjects, in other words, doing something work-related. Reduce the page
    > to the actual problem, get rid of the rest, and you might get much
    > better help.[/color]

    It's a girl in a bikini. I didn't really think of it as a "not safe
    for work" issue. I apologize. Girls in bikinis are not a focus of the
    site or anything like that. The pictures go with a (somewhat)
    legitimate news story.

    Here's another page with no bikini-clad women:


    Seperating out the problem is somewhat difficult, as these are
    generated pages. If I mess with the template to create just the
    problem in isolation, I basically take down my entire site.

    Comment

    • Jacqui or (maybe) Pete

      #3
      Re: Help please

      In article <52bc4584.03082 50744.add13e1@p osting.google.c om>,
      editor@badmouth .net says...[color=blue]
      > After a bit of experimentation , I can say that the page is recognizing
      > the first style I define in the head, but not the second. I switched
      > the order of the styles, and now look0 works and look1 does not. Did I
      > do something wrong here? (Styles are identical for right now. When I
      > get them both to work, I'll monkey with colors to differentiate.)
      >
      > ----------------
      >
      > <STYLE TYPE="text/css">
      > <!-- comment for old browsers not supporting CSS
      >
      > .look1 { font-family: verdana, arial, helvetica, sans-serif;font-size:
      > 10px;
      > color: 333399;backgrou nd-color: 93A7F0 }
      >
      > .look0 { font-family: verdana, arial, helvetica, sans-serif;font-size:
      > 10px;
      > color: 333399;backgrou nd-color: 93A7F0 }
      >[/color]
      Go here to check your css:



      Color values are preceded by '#', eg #333399. Spans can't enclose block
      content. Why are you repeating the font family a gazillion times in the
      code?

      Go here to check your html:

      W3C's easy-to-use markup validation service, based on SGML and XML parsers.


      Comment

      • Stephen Poley

        #4
        Re: Help please

        On 25 Aug 2003 08:44:33 -0700, editor@badmouth .net (John Marcotte)
        wrote:
        [color=blue]
        >After a bit of experimentation , I can say that the page is recognizing
        >the first style I define in the head, but not the second. I switched
        >the order of the styles, and now look0 works and look1 does not. Did I
        >do something wrong here? (Styles are identical for right now. When I
        >get them both to work, I'll monkey with colors to differentiate.)
        >
        >----------------
        >
        ><STYLE TYPE="text/css">
        ><!-- comment for old browsers not supporting CSS
        >
        >.look1 { font-family: verdana, arial, helvetica, sans-serif;font-size:
        >10px;
        >color: 333399;backgrou nd-color: 93A7F0 }
        >
        >.look0 { font-family: verdana, arial, helvetica, sans-serif;font-size:
        >10px;
        >color: 333399;backgrou nd-color: 93A7F0 }
        >
        >-->
        ></STYLE>[/color]

        Well, yes. As a quick check with the validator would have shown:

        You're missing some hashes. Don't know whether this will cure the
        problem, but when you've got an obscure problem, always start with the
        validator.

        In addition, consider scrapping Verdana:


        The font-size: 10px is not good news either:


        --
        Stephen Poley


        Comment

        Working...