[GTALUG] [OT] first stanza in css not understood

Chris F.A. Johnson chris at cfajohnson.com
Sat Apr 2 23:10:32 UTC 2016


On Sat, 2 Apr 2016, Paul King wrote:

> Hi
>
> Sorry if this is off-topic, but I have been scratching my head for hours and
> have been frustrated with this error. I am writing this code just for myself.
>
> The first stanza in my css code which I moved from HTML to an external css file
> does not appear to be read at all. This appears to happen whatever the first
> stanza is, and I have tried moving them around. All other CSS tags are
> understood, but only if they do not appear in the first stanza. I can give the
> first two stanzas including the lines above it (all comments). Doesn't look
> like there is anything wrong here to me, although there is a bit of repetition.
>
> Paul
>
> ------------------CSS CODE BELOW-----------------------------
>
> // Cascading stylesheet for form elements such as buttons
> // "equal" and "clear" are two class names I gave for form buttons

Those are not CSS comments. CSS comments are enclosed between /* and */.


>    .equal {
>          background-color: #4CAF50; /* Green */
>          border: 2px solid black;
>          color: white;
>          padding: 4px 7px;
>          text-align: center;
>          text-decoration: none;
>          display: inline-block;
>          font-size: 16px;
>          width: 50px;
>          }
>    .equal:hover {
>      background-color: #aefe41;
>      color: black;
>    }
>    .clear {
>          background-color: #FF0000; /* Red */
>          border: 2px solid black;
>          color: yellow;
>          padding: 4px 7px;
>          text-align: center;
>          text-decoration: none;
>          display: inline-block;
>          font-size: 16px;
>          width: 50px;
>          }
>    .clear:hover {
>          background-color: #FFABAB;
>          color: black;
>    }
> ---
> Talk Mailing List
> talk at gtalug.org
> https://gtalug.org/mailman/listinfo/talk
>
>

-- 
Chris F.A. Johnson, <http://cfajohnson.com>


More information about the talk mailing list