Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8348549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:43:28+00:00 2026-06-09T07:43:28+00:00

I need to add this: html, body{ height: 100%; } However, I am currently

  • 0

I need to add this:

html, body{
height: 100%;
}

However, I am currently stuck in a CMS where I can only edit under the BODY tag, which means that I am not able to add anything to the header, adjust the stylesheet or similar. My only way to add this is inline past the body tag. I can also execute PHP within this space if that would in any way solve this.

Am I in an impossible situation or is there a solution?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T07:43:30+00:00Added an answer on June 9, 2026 at 7:43 am

    You could output a javascript string with PHP that can adjust the styles:

    print '<script>document.body.style.height = '100%'; document.body.parentNode.style.height = '100%';</script>';
    

    That said, if you aren’t concerned about HTML validation and/or are using an HTML5 doctype, you can simply add a normal style tag anywhere. If you need to output this using PHP, just put it into a string (as I did with the above javascript):

    print '<style type="text/css">html, body{ height: 100%; }</style>';
    

    You may also want to look in to scoped style tags, a new addition to HTML5: http://dev.w3.org/html5/spec/the-style-element.html#attr-style-scoped

    Documentation

    • PHP print – http://php.net/manual/en/function.print.php
    • Javascript element.style – https://developer.mozilla.org/en-US/docs/DOM/element.style
    • Scoped style sheets – http://dev.w3.org/html5/spec/the-style-element.html#attr-style-scoped
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't access a element with its href. Like this example, i need add
I need to add some html right after the body tag so like :
I need to add authentication to this function: function multiRequest($data, $options = array()) {
I have a java.util.Set<City> cities and I need to add cities to this set
I need to add a checkbox with text Send a copy of this email
I need to add and delete class on an element having multiple classes: This
I need to add indexes to my table (columns) and stumbled across this post:
I need to add default value column in SqlServer Compact....i am new to this
I need to add a dependency on a specific version of GDIPlus. This is
I have this jquery function that works, except I need to add something. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.