A Pen by Sandeep S Kumar on CodePen.
Created
June 25, 2015 18:52
-
-
Save Brentophillips/a606210b2d040f87b382 to your computer and use it in GitHub Desktop.
Responsive Text Boxes
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 id="page"> | |
<div class="container"> | |
<div class="body"> | |
<p> | |
Hi, this is a paragraph in a box. | |
<br>And I am simply typing some random text to fill in this box. | |
</p> | |
</div> | |
<div class="upArrow"></div> | |
</div> | |
<div class="container"> | |
<div class="body"> | |
<p> | |
Hi, this is a paragraph in a box. | |
<br>And I am simply typing some random text to fill in this box. | |
</p> | |
</div> | |
<div class="upArrow"></div> | |
</div> | |
<div class="container"> | |
<div class="body"> | |
<p> | |
Hi, this is a paragraph in a box. | |
<br>And I am simply typing some random text to fill in this box. | |
</p> | |
</div> | |
<div class="upArrow"></div> | |
</div> | |
<div class="container"> | |
<div class="body"> | |
<p> | |
Hi, this is a paragraph in a box. | |
<br>And I am simply typing some random text to fill in this box. | |
</p> | |
</div> | |
<div class="upArrow"></div> | |
</div> | |
</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
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> |
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
@border-color: orange; | |
@border-bottom-color: #ccc; | |
@border-size: 5px; | |
#page { | |
max-width: 80%; | |
margin: auto; | |
} | |
.container { | |
margin: 20px; | |
margin-bottom: 0; | |
position: relative; | |
display: inline-block; | |
} | |
.body { | |
position: relative; | |
padding: 10px; | |
width: 80%; | |
background: #444; | |
border-top: @border-size solid @border-color; | |
border-bottom: 2px solid @border-bottom-color; | |
color: white; | |
font-family: georgia; | |
font-size: 14px; | |
line-height: 1.5; | |
box-shadow: inset 0 0 @border-size #333; | |
} | |
.upArrow { | |
position: absolute; | |
top: @border-size; | |
left: 80%; | |
margin-left: -@border-size; | |
width: 0; | |
height: 0; | |
border-left: @border-size solid transparent; | |
border-right: @border-size solid transparent; | |
border-top: @border-size solid @border-color; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment