0

I'm having a problem where the site menu on the left hand of the page gets bigger on one of the pages. On this certain page, I have a table and a script editor web part in the table. I think it has something to do with the width percentage on my script editor. But if I make the percentage lower than 100% it changes the table and makes the other columns smaller. I've tried changing it so the height is specified at 100% but it just looks the exact same. Any help would be appreciated!

enter image description here In this picture the menu font size is weirdly large compared to how the menu is in the rest of the website.

enter image description here Here is the first part of my code. The rest is just a table with some pictures and links in it.

New contributor
Taryn Brown is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1

The problem here is that your custom HTML is repeating some basic HTML elements that are already present on the page.

If you were creating a standalone web page, then yes, your structure is correct, you would want the root <html> tag, a <head> with your <style> block in it, and then a <body>. But in the case of inserting HTML into a SharePoint page, SharePoint is already generating the <html>, <head> and <body> tags, so you don't need to. Everything you are adding to the page will be inside the existing <body>.

In your case, the font size issue is happening because in your custom CSS, you are applying the font size to the <body>, which in this case is not the <body> in your custom HTML, but the true <body> which has been generated by SharePoint, and which the Quicklaunch menu is inside. So since the Quicklaunch is inside the main <body>, your custom font styles are getting applied to it as well as your custom content.

What you need to do is remove the <html> and <head> tags from your custom HTML (the <style> block will be just fine on its own), and change the <body> to be just a regular <div>, and give that <div> either an ID or a CSS class that you can use in a CSS selector so you can apply your font styles to it.

Your Answer

Taryn Brown is a new contributor. Be nice, and check out our Code of Conduct.

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.