0

Note: I am using a custom masterpage.

Problem:
When I use the color picker to change some font color and select "more colors…", the modal dialogue box that comes up is too small and has scroll bars. (see below)

enter image description here

I would like for it to auto adjust.

How do I fix this?
I tried using F12 to figure out what CSS element may be affecting it, and even tried changing some values, but I am unable to figure it out.

Note: You will notice there is a classification banner in the dialogue box. That is because I added a custom div to my masterpage so the banner will appear above the suitebar. I even tried removing the custom div to see if that was the problem, but the problem persists.


Update for Heather's comment:

I do not see any differences between the original and my custom css with respect to what you suggested.

Specifically, the ms-dlgFrameContainer are the same.

When I use F12, I find the entire color-picker dialogue box is class="ms-dlgContent" with an inline style of:

{
    left: 747px;
    top: 75px;
    width: 350px;
    height: 370px;
    display: block;
    z-index: 1505;
}

No custom CSS is affecting this.

The left and top styles are dynamic and change when I move the dialogue box around on the screen. If I change the above width and height to 400px, all that changes is the size of the dialogue box and the contents within the box (the #contentBox) does not dynamically resize with it. (see below)

enter image description here

Now if I go to the #contentBox I find the below custom CSS.

#contentBox {
    margin-right: 20px;
    margin-left: 20px;
    min-width: 703px; (this part has a line through it)
}

If I adjust the above CSS to this, I get close what I want (see pic below)

#contentBox {
    margin-right: 0px;
    margin-left: 0px;
    min-width: 300px !important;
}

enter image description here

Then I find this piece of code that is controlled by the themev4.css:

.more-colors-picker {
    overflow: hidden;
    text-align: left;
    margin: 10px; (this line is actually a drop down, margin-top, right, bottom, left)
}

If I adjust the #contentBox above and then also change the above margin from 10px to 0px, I get what I want (see pic below).

enter image description here

So my question now is, where in my custom css do I reference the .more-colors-picker to change the margin and how?

0

Does your master page or CSS add padding/margin to the body, s4-workspace, s4-bodyContainer, contentRow, contentBox, or DeltaPlaceHolderMain? The entire master page is loaded for that little color picker window. Anything added to the custom master could be bleeding through. You can use a browser inspector tool to find out what, then remove that from your code by targeting ms-dlgFrameContainer. For example:

/* Your design */    
#s4-workspace {
        margin: 1rem;
    }

/* Undo design changes for dialog window */
    .ms-dlgFrameContainer #s4-workspace {
        margin: inherit;
    }

You will have to play with what to reset the margin to based on your design and CSS. It may be inherit, initial, or a specific value like 0 or 5px.

  • I actually removed the left navigation so my site almost looks like an Oslo site...and the margin was actually reduced so the body of the site would take up that empty space. I will play around and see if I can identify what you are referring to. The only other thing I can think of where I messed with sizing was something you helped me out with here: sharepoint.stackexchange.com/questions/246540/…! – EricS Sep 17 '18 at 19:50
  • Heather, see my expounding comments with pictures above in my original post. I placed a line between the two. – EricS Sep 19 '18 at 14:16
0

UPDATE:

I was able to figure it out:

I update the following custom css with 300px !Important:

#contentBox
{
margin-right:20px;
margin-left:20px;
min-width:300px !Important;
}

And I added the below custom css:

.more-colors-picker
{
margin: 0px;
}

I also updated the classification banner div in my custom.html with a class name and added custom css. Now the banner doesn't show up in the modal-dialog box...which I believe was also adding to the issue.

<div class="ms-dialogHidden unclass-Banner">This site contains dynamic content -- Highest Possible Classification is <strong>UNCLASSIFIED//FOUO</strong></div>


.unclass-Banner
{
background-color:#009900;
text-align:center;
width:100%;
font-weight:normal;
color:#fff;
padding-bottom:1px;
}

Result:

enter image description here

Your Answer

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

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