1

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?

1 Answer 1

2

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.

1
  • 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, 2014 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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