Forums

div id = posts (6 posts)

  1. greg2008
    Member
    Posted 3 years ago #

    I am using the Corporate theme, and cannot for the life of me find the CSS that relates to the id="posts".

    I have found the post class - .post{}
    But am looking for where the #posts{} is defined.

    I have searched this site and Google and the theme owners site, but could not find anything relating to it, obviously searching with keyword "posts" only brings unrelated results in WP and Google.

    Is this CSS ID something to do with the spans? If so, is there a doc on it? Obviously searching for "spans" only returns unrelated results too.

    It doesn't even tell me where it comes from in FF Firebug.

    Cheers.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    Perhaps the CSS simply doesn't declare any style for #posts.

  3. t31os
    Member
    Posted 3 years ago #

    If you're referring to...

    #post-1
    #post-2

    and so on...

    You'll need to look in your template files for something along the lines of...

    <div class="post" id="post-<?php the_ID(); ?>">

    Notice the id= part...

    Is this what you refer to?

  4. greg2008
    Member
    Posted 3 years ago #

    It's actually "postS" not "post", but yes I found the code you are referring to:
    <div class="post" id="posts-<?php the_ID(); ?>">

    But in some template files I have there's also a direct use of the ID without the PHP:
    <div id="posts" class="span-16 prepend-1 append-1">

    Is this simply the Corporate theme using an ID that doesn't exist? If so, as it's the theme's template files calling the theme's CSS I would have thought that to be bad.

  5. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    If you checked through all of the theme's CSS files and you can't find any reference to #posts, then it does look like the theme's CSS simply doesn't include any styling that's specific aimed at #posts.

    I don't think that makes Corporate a bad theme. I've written a few themes for distribution and I've sometimes included additional hooks that I've not styled but are there for users to attach additional style to, if they so wish.

    Try adding your own CSS for #posts. If it doesn't work as you expected, use Firebug to help you determine if you missed a #posts declaration somewhere.

  6. greg2008
    Member
    Posted 3 years ago #

    Thanks.

    Using firebug to see the DIV, the only thing it does is offer a container around the collective posts, with of course some padding with the append/prepend.

    I don't like the idea of having unused code, but I do understand providing unused hooks could be helpful to some people within a publicly used CMS.

    As with any code, I prefer to know a bit more about it before messing with it. Especially in complex setups like WordPress where code is called and defined from various places.
    But as I cannot find CSS for it and no-one has stated it's an integral part of the code I might just rip it out altogether.

    Cheers

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.