Skip to content

Instantly share code, notes, and snippets.

@singhArmani
Created July 20, 2019 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save singhArmani/0276ec919fb390718f7ceb0b0ad1ad86 to your computer and use it in GitHub Desktop.
Save singhArmani/0276ec919fb390718f7ceb0b0ad1ad86 to your computer and use it in GitHub Desktop.
Block level and Height
/**
* Block level and Height
*/
div {
width: 600px;
background-color: gold;
}
<!-- content to be placed inside <body>…</body> -->
<!--button has 'inline-block' display by default, changing it to 'block' won't expant
the button to acquire its parent widht. So, we explicity have to set
width to '100%'-->
<div>
<button style="display: block; width: 100%";>test</button>
<div style="background-color: red">Inner div </div>
</div>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"html"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment