+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Empty <p> in Blog Post Snippet

Empty &lt;p&gt; in Blog Post Snippet

5 posts, 1 answered
  1. Cory
    Cory avatar
    8 posts
    Registered:
    27 Sep 2010
    27 Sep 2010
    Link to this post
    We are using the blog post control on our home page, http://www.visfire.com/Default.aspx,  to display snippets of recent articles.  The CMS is generating empty tags for items we have not chosen to display.  This is causing unnecessary padding.  How do we correct this?  Or is there a better way to display blog post snippets?  Thank you very much.

    Notice all the empty <p> tags
    <ul class="sf_postListing">
        <li>
                <h2 class="sf_postTitle">
                    <a id="ctl00_LowerBodyBlog_BlogPosts1_ctl00_repeater_ctl01_fullContent1" href="Blog/10-09-24/Great_Offices_of_The_Tech_World.aspx">
                        Great Offices of The Tech World
                    </a>
                </h2>
                <p class="sf_postDate">
                     
                </p>
     
                <div id="ctl00_LowerBodyBlog_BlogPosts1_ctl00_repeater_ctl01_pnlPostContent" class="sf_postContent">
         
                    Web developers and designers are creative in nature, or at least they should be, and as creative people our surroundings are important to us.  Take a look at the article that popped up on Inspirationfeed.com a few days ago.  Igor Ovsyannkov compiles photos from some of the world’s most inspiring ...
                 
    </div>
                <p class="sf_readMore">
                    <a id="ctl00_LowerBodyBlog_BlogPosts1_ctl00_repeater_ctl01_fullContent2" href="Blog/10-09-24/Great_Offices_of_The_Tech_World.aspx">
                        Full story
                    </a>
                </p>
                <p class="sf_postComments">
                     
                </p>
     
                <p class="sf_postAuthor">
                    <a id="ctl00_LowerBodyBlog_BlogPosts1_ctl00_repeater_ctl01_postedBy" href="Blog.aspx">
                        Author:Cory Rowan
                    </a>
                </p>
                <p class="sf_postCategory">
                     
                </p>
                <p class="sf_postTags">
                     
                </p>
     
            </li>
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    27 Sep 2010
    Link to this post
    Hello Cory,

    Modify the p container selector in http://www.visfire.com/App_Themes/Home/style.css

    #Container p {
    line-height:20px;
    margin:0;
    padding:0 0 0;
    text-align:justify;
    }

    By default you are setting bottom padding to 14 px.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  3. Cory
    Cory avatar
    8 posts
    Registered:
    27 Sep 2010
    27 Sep 2010
    Link to this post
    Changing my #Container p would make all of my paragraphs collapse.  I would like to remove empty paragraph tags in the blog feed.
  4. Cory
    Cory avatar
    8 posts
    Registered:
    27 Sep 2010
    27 Sep 2010
    Link to this post
    Ivan,

    I would also like to edit the I would also like to edit the sf_postTitle, but the style seems to be coming from a dynamic source such as,
    http://www.visfire.com/WebResource.axd?d=SkA6RCRaDVK04yAxKexPYlHPfHhDJgP0Vl7IlxPYuta39XOdFGazj2AaBKAfp_znMb_bt6IVdgcK92DT85K-wZHY6xVzKGqPo6rVHy4oRiMyzicYwkuzOtYyY7YJcDv30&t=634121384135782500.

    Where do I find these styles?
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    27 Sep 2010
    Link to this post
    Hi Cory,

    Then you can try using the specific selectors

    ul.sf_postListing li p, .sf_singlePost p, .sf_postComments p {
    margin:0 0 5px;
    padding:0 !important;
    }


    You can take a look at How to apply custom stylesheets to content view based controls

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
5 posts, 1 answered