CSS for plugin (2 posts)

  1. Demetrius Pop
    Posted 2 years ago #

    I have this simple plugin that creates a copyright in the footer section.
    `function add_copyright() {
    $copyright_message = "Copyright ". date(Y) . bloginfo('name') . ", All Rights Reserved";
    echo '<div id="plugin-copyright">' . $copyright_message . '</div>';

    My question is:
    How do I add the CSS so that the div can be positioned?

  2. bcworkz
    Posted 2 years ago #

    Three possibilities. You can use wp_enqueue_style() to link to an external CSS file.

    You can output CSS in between <atyle> tags.

    You can add a style attribute to the <div> tag, something like:
    <div id="plugin-copyright" style="top: 30px; left: 100px; position: relative;">

Topic Closed

This topic has been closed to new replies.

About this Topic