Classes with style

When creating multiple classes is it ok to put them all within one set of style brackets to save typing the style bit everytime or is it better to put each class in its own style bracket. Im new to this!

What do you mean? Can you give an example?

You can style code in the forum by using three backticks (found to the left of your 1 key up top, usually).

    ```
        .css-code {
           /* here */
        }
    ```

Yes it is. for example class=“mydiv col-sm-4 pull-center text-left”

<style> .red-text { color-red } </style>

So if I wanted to another class for something else, lets say font size for example would people normally put it within the existing two style tags or create a new style tag for each class

@DTZee Yes, you only need one set of style tags.

<style>
    .red-text {
        color: red;
    }

    .blue-bg {
        background-color: blue;
    }
</style>
2 Likes

I’m sorry, I misunderstood.

{
color:red;
font-size: 14x;
}

You can have as many styling options as you need within the brackets as long as there is a semi-colon after each statement.

1 Like

thanks, im clear now

thanks, i understand now

Happy Coding! It gets more fun.