Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We've set up a page in Office 365 that has the following in the HTML for the page (not the master page)

<div class="cont">
    <div class="row">
        <div class="some-random-other-class">
            <p>hello</p>
            <p>This thing</p>
        </div>
    </div>
</div>

Now, the trouble is that when I apply a Page Element style from the style menu to an element inside the row div (e.g. the "This thing" paragraph in the example above):

enter image description here

It wipes out some of my classes:

<div>
    <div>
        <div class="some-random-other-class">
            <p>hello</p>
            <h1>This thing</h1>
        </div>
    </div>
</div>

I'm struggling to understand why it does this - has anyone else run into this before? Is there some reason behind this, or have I uncovered a bug in the editor?

share|improve this question

1 Answer 1

This is a bit tricky. There are some issues with the style menus. Basically, when it need to apply a style, it changes the vicinity as well. One thing you can do is get the class some-random-other-class and apply the parent div the 'row class' style as it describes here.

Then take the parent of row class and assign cont class style there.

Another good old way is entering the header 1 tag manually.

share|improve this answer
1  
Cool, I like this answer, it's a bit nicer than some other solutions I've seen. Unfortunately we can't enter the h1 tag manually as it is going to be clients adding these styles. The way I actually solved this was to move the wrapper divs out into the page layout rather than the RTE, but that's not a general solution. –  Jeff Sep 1 at 21:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.