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

Forums / Developing with Sitefinity / Generic Content styles

Generic Content styles

11 posts, 1 answered
  1. Andrei
    Andrei avatar
    553 posts
    Registered:
    27 Nov 2008
    26 Jul 2010
    Link to this post
    Hello,

    Just want to report a strabge behaviour of Sitefinity 3.6.

    I am editing a new Generic Content. I have added a table. For some of the cells in the table I am declaring the following style: <td style="border-top: white 1px dotted;"> </td> which means: make the top border for this cell dotted, ect.

    In design mode and preview mode shows it as dotted. As soon as I Save it and Publish it, changes. The border becomes solid. I have tried the HTML outside Sitefinity and it works fine.

    Thanks,

    Andrei
  2. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    26 Jul 2010
    Link to this post
    Hi Andrei,

    Can you please post the HTML code that is being generated in the RadEditor so we can check it for you ...

    Thanks,

    G
  3. Andrei
    Andrei avatar
    553 posts
    Registered:
    27 Nov 2008
    26 Jul 2010
    Link to this post
    Thanks G,

    Below is an example of the code. I want to make the borders inbetween the lines - dotted. In design and preview mode shows ok. As soon as I save and publish - is not.

    <style type="text/css">
        table {border-collapse:collapse; border:black 1px solid;font-size: 13px;}
        td {border-width:1px; border-style:solid;}
        .greyvalue {background-color:#C0C0C0; text-align:center;}
        .notepad{border-top:1px dotted White;}
    </style>
    <table width="100%">
        <tbody>
            <tr>
                <td class="greyvalue">Line 1 </td>
            </tr>
            <tr>
                <td class="greyvalue notepad">Line 2 </td>
            </tr>
            <tr>
                <td class="greyvalue notepad">Line 3 </td>
            </tr>
            <tr>
                <td class="greyvalue notepad">Line 4</td>
            </tr>
            <tr>
                <td class="greyvalue notepad">Line 5 </td>
            </tr>
            <tr>
                <td class="greyvalue notepad">Line 6 </td>
            </tr>
            <tr>
                <td class="greyvalue notepad">Line 7 </td>
            </tr>
        </tbody>
    </table>

    Thanks
  4. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    26 Jul 2010
    Link to this post
    Hi Andrei,

    Try this code.

    <style type="text/css">
        table {border-collapse:collapse; border:black 1px solid;font-size: 13px;}
        td {border-width:1px;}
        .greyvalue {background-color:#C0C0C0; text-align:center;}
        .notepad{border-top:1px dotted White;}
    </style>
    <table width="100%">
        <tbody>
            <tr>
                <td class="greyvalue">Line 1 </td>
            </tr>
            <tr>
                <td class="greyvalue notepad">Line 2 </td>
            </tr>
            <tr>
                <td class="greyvalue notepad">Line 3 </td>
            </tr>
            <tr>
                <td class="greyvalue notepad">Line 4</td>
            </tr>
            <tr>
                <td class="greyvalue notepad">Line 5 </td>
            </tr>
            <tr>
                <td class="greyvalue notepad">Line 6 </td>
            </tr>
            <tr>
                <td class="greyvalue notepad">Line 7 </td>
            </tr>
        </tbody>
    </table>

    I have removed the border style from the td ... what you can do is to combine the notepad and td styles together ... The above code should work for you ...

    Best

    G
  5. Andrei
    Andrei avatar
    553 posts
    Registered:
    27 Nov 2008
    26 Jul 2010
    Link to this post
    Ok G,

    I see what you have done. Many thanks. I thought that notepad would have overridden the solid black border as it does
    when I edit it separately (in Textpad) and open it in IE. There seems to be a difference in behaviour between how it looks when i preview it and how it looks when finally publish it.

    I have other tables in the same page which have lost their solid borders now that the td is changed. Will have to rethink.

    Thanks again,

    Andrei

  6. Ravishankar Baranwal
    Ravishankar Baranwal avatar
    19 posts
    Registered:
    18 Mar 2009
    20 Oct 2010
    Link to this post
    I had added some generic content and want to change its text color using Editor provided by sitefinity but not able to do this. Can you help me out regarding this.
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    20 Oct 2010
    Link to this post
    Hello Ravishankar,

    Could you elaborate some more why you are not able to change the text color and how you have tried to do this ?

    Kind regards,
    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
  8. Andrei
    Andrei avatar
    553 posts
    Registered:
    27 Nov 2008
    08 Feb 2011
    Link to this post
    Hi,

    In the generic content editor, if I have a table with cells that are completely empty (not even &nbsp; inside) it does not show the cell at all. But if I click once on the HTML view and then back on the Design view the cell appears. 

    Why is it not visible straight-away as you load up in the design view? I do not want to have &nbsp; inside it at all times because the cell will be edited often and might or might not have text in it. The problem at the moment is if an empty cell is not visible in design mode then the user can not fill it in.

    Many thanks,
    Andrei
  9. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    14 Feb 2011
    Link to this post
    Hello Andrei,

    Can you please let us know which browser you are using? I am unable to reproduce the problem.

    Kind regards,
    Radoslav Georgiev
    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
  10. Andrei
    Andrei avatar
    553 posts
    Registered:
    27 Nov 2008
    15 Feb 2011
    Link to this post
    Radoslav,

    I see the same issue in Sitefinity 4.0 and so I based my examples on 4.0.

    These are the steps:

    1 - Insert table.
    2 - Go to the HTML view and take away all the 'nbsp' that it adds by default in every cell.
    3 - Save and close down.
    4 - Invoke Editor again (the table is not properly visible - tablecellsatloadtime.gif).
    5 - click on the HTML view (see tablecellsactualhtml.gif).
    6 - click on the Design view again (the cells look ok see tablecellsafterhtmlclick.gif).

    I do not want my users to click on the HTML view and then back to Design so that they can see the cells. Also, I do not want the 'nbsp' in the cells because it affects the alignment. 

    Finally, I use IE 8.0.6001.18702 because that is what the customer will be using.

    Many thanks,
    Andrei

    P.S. I really need this fixed for the project I am working on based on Sitefinity 3.7 SP4 (.NET Framework 4.0).
  11. Sonya
    Sonya avatar
    205 posts
    Registered:
    09 Dec 2016
    22 Feb 2011
    Link to this post
    Hello Andrei,

    The described behaviour is valid only for IE. As a workaround i suggest you do not replace the style with the attribute. As a workaround please, use  <table style="width: 100%;"> instead of <table width="100%;">.

    Regards,
    Sonya
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
    Answered
Register for webinar
11 posts, 1 answered