• i would like a simple guide to how div id, div class, and making your own formatting works. i have found numerous threads on this but when i change the class, make my own class, and change formatting in .css i still can’t get things to work. i had this class “block block-user” defining most things and i dont know what it is. i created a mylist class and changed some of the block block-user tags but nothing happened. i just want to know the proper syntax and how to set these up. if anyone could help i would really appreciate it thanks!!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • If you had a class=”block blockuser”, that would mean you’d see TWO classes in your stylesheet. One for block and one for blockuser.

    Further learning:
    http://www.w3schools.com/css/default.asp
    http://www.html.net/tutorials/css/

    Thread Starter mikesd

    (@mikesd)

    thanks. ill read up some more. there is not a block or block-user style defined in style.css? should i make one? like this… #block {…} or .block {…} . this is under the div id=left_side and the text is a list. thanks for your help.

    Thread Starter mikesd

    (@mikesd)

    Can anyone write the exact syntax for style.css for this right.php excerpt??

    <?php } elseif( is_category(‘6’) ) { ?>

    <h3><?php _e(“Call to Action”); ?></h3>
    <p><img src=”wp-content/themes/newsportal-10/images/checkmark.gif”>Reduce Excessive Overtime at Fire Department</p>
    <p>The Mayor and Council should demand a plan to reduce the excessive overtime being paid at the Fire Department.</p>
    <?php if ( !function_exists(‘dynamic_sidebar’)
    || !dynamic_sidebar(2) ) : ?>

    <h3><?php _e(“Latest News”); ?></h3>
    <h5>Drop-Offs Reporter in Most San Diego Crime Categories</h5>
    <h5>San Diego Union-Tribune</h5>
    <h5>January 10, 2007</h5>
    <p></p>

    <div class=”block block-node”>

    </div>

    <div class=”block block-node”>

    <?php

    $today = current_time(‘mysql’, 1);

    if ( $recentposts = $wpdb->get_results(“SELECT ID, post_title FROM $wpdb->posts WHERE post_status = ‘publish’ AND post_date_gmt < ‘$today’ ORDER BY post_date DESC LIMIT 10”)):

    ?>
    <h3><?php _e(“Recent Posts”); ?></h3>

      <?php

      foreach ($recentposts as $post) {

      if ($post->post_title == ”)

      $post->post_title = sprintf(__(‘Post #%s’), $post->ID);

      echo ”

    • ID).”‘>”;
    • the_title();

      echo ‘
      ‘;
      echo ‘<p></p>’;
      }

      ?>

    <?php endif; ?>

    </div>

    <div class=”block block-node”>

    <h3>Search</h3>

    • <form method=”get” id=”searchform” action=”<?php echo $_SERVER[‘PHP_SELF’]; ?>”>

      <input type=”text” size=”10″ value=”<?php echo wp_specialchars($s, 1); ?>” name=”s” id=”s” /><input type=”submit” id=”sidebarsubmit” value=”Search” />

      </form>

    </div>

    <?php endif; ?>

    –everything just seems real cluttered in my .php and .css and I want to set it up right.

    Thanks!!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘div class and div id setup’ is closed to new replies.