Last active
July 22, 2019 02:37
-
-
Save singhArmani/bc7f7c699616bbaafa516aacb85a9351 to your computer and use it in GitHub Desktop.
Untitled
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.first { | |
padding: 10px; | |
height: 300px; | |
margin: 10px 30px 30px 10px; | |
background: red; | |
box-shadow: 0 0 0 10px gold; | |
width: 100px; | |
text-align: center; | |
float: left | |
} | |
.news { | |
background: gold; | |
border: 2px solid purple; | |
} | |
.news img { | |
float: left; | |
} | |
.news p { | |
float: right; | |
} | |
.clear { | |
clear: both; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="news"> | |
<img src="https://fakeimg.pl/100/" alt="my pic" /> | |
<p>Some text</p> | |
<br class="clear" /> | |
floats take no space as they are taken out of normal document | |
flow. If we don't use break element with clear "both" the "news" wrapper div will collapse. | |
Try removing br element and see what happens. | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"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