htmlformattingoverridingdefaults

Html override settings


I have my css file set up so that this happens for all pages on my site:

body,html{
  height:100%;
}

div#right{
  height:100%
}

I want one page to be an exception. How do I override and use the default height values for that page? Is it enough to declare the html and body with height="auto" in the .html file?


Solution

  • If this code is in external CSS file then write <style> tag in the page you don't want height 100% as -

    <link href="style.css" rel="stylesheet" type="text/css" /> <!-- your current CSS file -->
    
    <style type="text/css">
    
    html, body{
      height: auto;
    }
    
    </style>