#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    3
    Rep Power
    0

    Question How to show part of article by css?


    Hi all,
    I write a web which want to show part of an article folowings:
    Title:How to learn Chinese easily?
    Tag: Learn Chinese,Chinese language,learn language
    text: Many foreign students who learn Chinese in Shanghai are usually meet with the fact called national language of Shanghai,which is not widely spoken as imagined.Different cities different local dialects make more difficult to learn Chinese. But if you choose a Mandarin Morning Chinese school in shanghai you will learn mandarin very easily and efficiently,followings are tips:

    For example,if you just want to show title and tag,then what is the css?
    I really want to know how to achieve this kind of effect,if you know how to do that,please let me know.
    I am so appreciate!
    Many thx!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2011
    Posts
    118
    Rep Power
    50
    It this what you are looking for?

    Give the container that you want to potentially hide a class (or id or other CSS selection criteria). E.g.,

    Code:
    <p class="article-text">Many foreign students who learn Chinese ...</p>
    Try the "display:none" property for the class. It will then, not display. E.g.,

    Code:
    .article-text {display:none}
    For more on the display property see:
    http://www.w3.org/TR/CSS21/visuren.html#propdef-display
    You might also want to compare that to the CSS visibility property.
    Last edited by EEsterling; June 5th, 2013 at 04:07 PM.

IMN logo majestic logo threadwatch logo seochat tools logo