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

Forums / General Discussions / Get rid of margins or padding on List control

Get rid of margins or padding on List control

5 posts, 0 answered
  1. Eric
    Eric avatar
    40 posts
    Registered:
    10 Apr 2009
    25 Sep 2009
    Link to this post
    Hello,

    I am using a List for some FAQ sections.  The list item header and list item are both indented.  How to I align headers and items all the way to the left.  I tried some of your formum suggestions with CSS but was not successful.

    -- Here is a quick sample of one thing I tried.  The color and font family work.  Margin and padding does not affect the control indents. 

     

    sf_listItemBody

     

    {

     

    padding:0;

     

     

    margin:0;

     

    }

     

     

    .sf_listItemTitle

     

    {

     

    color:Gray;

     

     

    font-family:Arial;

     

     

    padding:0;

     

     

    margin:0;

     

    }



    Thanks.

    Eric
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    26 Sep 2009
    Link to this post
    Hello Eric,

    Thank you for using our services.

    Have you tried to map, the external template of the list you are using and then modify the template to point to your style sheets instead of the embedded ones. This will prevent the list view to override styles such as padding and margin.

    If for example you are using the Simple List mode, go to ~/Sitefinity/ControlTemplates/Lists/SimpleListMode.ascx and modify the CSS file link control to point to your styles:
    <telerik:CssFileLink ID="CssFileLink1" FileName="~/YuorPathTo/listsCommonLayout.css" Media="screen" runat="server" /> 
     

    For your convenience I am attaching the embedded styles for the list view. If you do not have the external templates, you will have to download the external templates archive from your Client.Net account.

    All the best,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Eric
    Eric avatar
    40 posts
    Registered:
    10 Apr 2009
    28 Sep 2009
    Link to this post
    Hello,

    Thank you for the response.  The first thing I noticed what that I don't have the Lists folder under ControlTemplates.  Can I create the directory with the template or what should I do?
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    28 Sep 2009
    Link to this post
    Hi Eric,

    Thank you for getting back to me.

    As I mentioned in my previous post, if you do not have the external templates, you should download them from your Client.Net account. For more information, please take a look at the following KB article.

    If you have more questions, please feel free to contact us.

    Sincerely yours,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Eric
    Eric avatar
    40 posts
    Registered:
    10 Apr 2009
    28 Sep 2009
    Link to this post
    Sorry.  I did not read carefully before.  Your suggestion worked.  Thanks for your help.
Register for webinar
5 posts, 0 answered