1

I have created a page using HTML and CSS table and tried to display this page as a SharePoint site page. However when i viewed this page as SharePoint site page all the divs got jumbled up and was displayed completely opposite to how it got displayed normally outside SharePoint.

Here is my HTML for a particular div:

<div id="cr">
    <ul class="contact-img">
        <li><img src="Landing page/Contacts/CassWade.png"></li>
        <li>Cass Wade<br/>Project Manager</li>
        <li><img src="Landing page/Contacts/Meredith.png"></li>
        <li>Meredith<br/>HR Head</li>
        <li><img src="Landing page/Contacts/Simon.png"></li>
        <li>Simon<br/>CEO</li>
        <li><img src="Landing page/Contacts/Roger.png"></li>
        <li>Roger<br/>Director</li>
    </ul>
<hr/>
</div>

Following is my CSS for the above div:

.contact-img{
position: relative;
list-style:none;
display:table;
border:none;
padding:none;
margin:none;
}

.contact-img li{
display:table-cell;
padding:10px 10px 10px 10px;
vertical-align:middle;
margin-left: 25px;
}

On a normal page this is rendering as table while on SharePoint this is rendering as list. Is there any restrictions on use of CSS in SharePoint? Any help would be highly appreciated. Thanks in advance.

  • 1
    Your CSS is not getting saved. Similar question here: stackoverflow.com/questions/21905139/… – Akhoy Sep 21 '15 at 7:10
  • 1
    A work around is to convert the html to a simple aspx page, and surface it into a webparts page with a page viewer webpart – Swayam Siddha Sep 21 '15 at 9:10
  • @SwayamSiddha May i know the reason why the page is not getting displayed properly as site page whereas it is working fine within CEWP? – Yash Saraiya Sep 21 '15 at 10:21
  • 1
    It might be because of conflict of your custom css with the default css of sharepoint – Swayam Siddha Sep 21 '15 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.