WordPress.org

Ready to get started?Download WordPress

Forums

"Read more" not accepting CSS style in K2 (8 posts)

  1. jaanshen
    Member
    Posted 1 year ago #

    Hi, I've tried several methods from various tutorials online, but none seem to work.

    You can see the issue here, in the post "The ultimate no-budget filmmaker lenses for the..." (currently the latest post)...
    http://maketimemove.com

    This is the style, from my "style.css"...

    .read-more, h3 { /* H3 is entry headlines. H4 is comments and replyform headlines */
    	display:inline;
    	background-color: #B3FFFF;
    	border-color: #B3FFFF;
    	border-width: 2px;
    	border-style: solid;
    	line-height: 1.4em;
    	font-weight: normal;
    	padding-bottom: 0px;
    	text-align:right;
    	}

    This is what I currently have in "single.php"...

    <?php the_content('<span class="read-more">...CONTINUE TO THE FULL ARTICLE</span>', 'k2_domain')); ?>
    				</div><!-- .entry-content -->

    It's still displaying the "read more" text how it always has, as if I had never changed the default K2 code. Here's that code (which I changed already)...

    <?php the_content( sprintf( __('Continue reading \'%s\'', 'k2_domain'), the_title('', '', false) ) ); ?>
    				</div><!-- .entry-content -->

    Is "single.php" the wrong file to be changing? Thanks in advance for any help.

  2. Shail
    Member
    Posted 1 year ago #

    i don't understand actually what you want please explain...

  3. jaanshen
    Member
    Posted 1 year ago #

    Hi Shail. Thanks for responding.

    I want my "read more" text to have an inline background color and align right. I have the css style "read-more" set up for it, but am having trouble finding where/what php file to apply it via span class.

  4. cinghaman
    Member
    Posted 1 year ago #

    >> CONTINUE TO THE FULL ARTICLE ? already has a background color
    or you r pointing to somewhere else ?

  5. Shail
    Member
    Posted 1 year ago #

    Add this style at bottom of your style.css..

    .more-link
    {
        float:right;
    }

    and you also add more style in .more-link class as you required.........
    Hope this work for you....

  6. jaanshen
    Member
    Posted 1 year ago #

    Thanks Shail & Robin. Sorry for the confusion, I found a workaround before your posts.

    Shail: I'm using inline for the text background color, which seems to make float:right not work. Any ideas? ... though I can deal with it being aligned left as it presently is.

    Thanks again.

  7. cinghaman
    Member
    Posted 1 year ago #

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. It will make your answers more readable if you use them. ]

    not sure why r u using it with h3

    but just simple without inline as well with float right it works

    .more-link {
        background-color: #B3FFFF;
        border-color: #B3FFFF;
        border-style: solid;
        border-width: 2px;
        float: right;
        font-weight: normal;
        line-height: 2em;
        padding-bottom: 0;
    }
  8. Shail
    Member
    Posted 1 year ago #

    .more-link
    {
        float:right !important;
    }

    May this works for you......

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags