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 8977835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:27:51+00:00 2026-06-15T19:27:51+00:00

The HTML tag on this page I’m working on is in a class that

  • 0

The HTML tag on this page I’m working on is in a class that is giving it a top padding of 28px. I need this to go away temporarily when a button is clicked, but it doesn’t appear that I can change the styling of the HTML tag itself.

Will I need to use position: relative; on the body tag or something similar? Is there really a way to assign CSS to the HTML tag that I don’t know about?

@ Comments:

Sorry, I’m in a bit of a rush here. It’s something to the effect of this:

<html class='pad_my_top'>
<head>

<style type='text/css'>
    .pad_my_top{
        padding-top: 28px;
    }

    body{
        background: #000000;
    }
</style>

<script type='text/javascript'>
    function its_gone(){
        // Something here to remove padding.
        alert("It's gone. Hurray!");
        // Something to put it back.
    }
</script>

</html>
<body>

<button onClick='its_gone()'>Click me to get rid of the top padding</button>

</body>
</html>

I really want it gone so I can print the page with Javascript, but I’d rather not use any 3rd party code because this is for a plugin for WordPress and I don’t want a billion dependencies. I only need to hide/re-display 3 divs and (re)change 2 styles.

  • 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-15T19:27:53+00:00Added an answer on June 15, 2026 at 7:27 pm

    Use this to remove the top padding:

    document.documentElement.style.paddingTop = "0";
    

    and this to set it back:

    document.documentElement.style.paddingTop = "28px";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this tag into my html file: {{block:my_test_block}} {{news:my_test_block2}} I need to parse
I have a Change Password page that has a H2 HTML tag that says
I wanted HTML's CODE tag appear as on this page. (ie with line numbers,
I have an named HTML anchor tag that works like a bookmark. This tag
I am designing an html web page that mimics inline panes by defining this
So I have this page on one domain that has a script-tag pointing on
The Html that I'm getting ideally looks like this: <span class=RapidLink1-H>See the more detailed
I have this code which can display drop down in div tag of html.
I've written this template inclusion tag: @register.inclusion_tag('blog/post_detail.html') def post_detail(post, show_meta=True): return { 'post': post,
I have a simple html multiline tooltip implementation: this.tooltip = function(tag) { xOffset =

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.