topranger123
New Member
The HTML tag on this page I'm working on is in a class that is giving it a top \[code\]padding\[/code\] of \[code\]28px\[/code\]. 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 \[code\]position: relative;\[/code\] 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:\[code\]<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>\[/code\]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.