Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Date too close

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #35652
    angelazou
    Participant

    CSS seem so simple, but it’s full of surprises when configuring them. This issue has to do with a WordPress plugin that I modified to show the date. Somewhere along, it went wrong. The date seems to be next to the title when I actually want it to be pushed to the right side of the box. I can’t use ‘float:right;’ because there is already a ‘float:left’;

    See a screenshot here

    Here is the CSS code

    .cat-post{
    width: 100%;
    }

    .cat-post-list{
    display: block;
    margin-bottom: 20px;
    position: relative;

    }

    .cat-post-images{
    float: left;
    width: 140px;
    display: block;
    }

    .cat-content{
    width: 350px;
    float: right;
    }

    .cat-post-title{
    display: block;
    width: 100%;
    }

    .cat-clear{
    clear: both;
    }

    .cat-post-category{
    margin-bottom: 7px;
    }

    .cat-post-date{

    }

    And here is a sample output HTML

    post-1


    post-2


    post-3



    post-4


    post-5


    #92784

    Using float: right; should be fine. Different elements are allowed to have different floats.

    Change .cat-content to float: left; and then give .cat-post-date float: right;

    #92785
    angelazou
    Participant

    Got it, thanks

    #92787

    No worries.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.