WordPress.org

Support

Support » Themes and Templates » css style disappearing from div

css style disappearing from div

  • How come when I put in css styles via <div style=””>, and press save and publish, my Div Tag gets turned into <div> and the style disappears?

Viewing 2 replies - 1 through 2 (of 2 total)
  • For CSS to affect a Div, you should use


    <div id="">

    or


    <div class="">

    Classes can be edited with periods, IDs with Number signs. As in the example:


    #header
    {
    Width: 780px;
    }

    .headertitle
    {
    Color: red;
    }

    Is there really no other way? Like via a plugin? It wouldn’t make sense just to keep updating the style sheet for all the different layouts you sometimes want for each post.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘css style disappearing from div’ is closed to new replies.
Skip to toolbar