[Support request] How to apply CSS styles

Home Forums Support [Support request] How to apply CSS styles

Home Forums Support How to apply CSS styles

  • This topic has 3 replies, 2 voices, and was last updated 6 years ago by Tom.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #553731
    Robert

    I want to be able to apply CSS styles without going to the HTML level. For example, look at this test page:
    http://www.mofsa.org/bob/lawsuits/
    I created it using GeneratePress Premium and Simple CSS plugin. Thia was easy using this CSS:
    h5 {
    color: black;
    text-align: center;
    background-color: #ccccff;
    font-size: 24px;
    }

    h6 {
    color: black;
    text-align: center;
    background-color: #ccccff;;
    font-size: 20px;
    }

    But that is customizing the H5 and H6 elements. My question is could I do it another way, using a custom style in place of the built-in header styles? Again, I don’t want to have to go the HTML level, because the main site maintainer is not familiar with HTML.

    #553942
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    I’m not too sure what you mean. CSS must be applied to HTML elements using the element name, class or ID. Can you explain a bit more?

    #553987
    Robert

    What I would like to do is define a class in CSS and then apply it visually to an element on the page — i.e. using the WP visual editor rather than the text editor, which will take me to the raw HTML.

    #554298
    Tom
    Lead Developer
    Lead Developer

    In order to use CSS, the element must have a class defined in HTML. So you’d have to go into the “Text” editor to add that class to the element.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.