Skip to content

Commit

Permalink
Fixed positions
Browse files Browse the repository at this point in the history
  • Loading branch information
assisfery committed Mar 25, 2021
1 parent 6a0bb6b commit 1d63a88
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
9 changes: 8 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">

<link rel="stylesheet" href="social-share.css">
<link rel="stylesheet" href="social-share.min.css">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

Expand Down Expand Up @@ -181,6 +181,13 @@ <h5>Strait</h5>
<br>
<div class="ss-box ss-strait ss-dark" data-ss-content="false"></div>

<br><br>
<h5>Position fixed</h5>
<p>To create the buttons in a fixed position combine the class <b>ss-fixed</b> with <b>ss-bottom, ss-top, ss-left</b> or <b>ss-right</b> in <b>ss-box</b> container.</p>
<pre class="alert alert-secondary">&lt;div class="ss-box ss-fixed ss-bottom" data-ss-content="false"&gt;&lt;/div&gt;</pre>
<br>
<!--<div class="ss-box ss-fixed ss-bottom" data-ss-content="false"></div>-->

<br><br>
<h5>Hide Icons</h5>
<p>If you dont want to show the icons of Social Network just include <b>data-ss-icon</b> attribute with value <b>false</b>.</p>
Expand Down
44 changes: 44 additions & 0 deletions social-share.css
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,50 @@
margin: 0 auto;
}

/*POSITIONS*/

.ss-fixed{
position: fixed;
z-index: 999;
left: 0;
right: 0;
}

.ss-bottom{
display: inline-block;
text-align: center;
bottom: 10px;
}

.ss-top{
display: inline-block;
text-align: center;
top: 10px;
}

.ss-left, .ss-right{
top: 50%;
transform: translateY(-50%);
}

.ss-left{
left: 10px;
}

.ss-right{
left: unset;
right: 10px;
}

.ss-left .ss-btn, .ss-right .ss-btn{
display: table;
width: 140px;
}

.ss-left[data-ss-content='false'] .ss-btn, .ss-right[data-ss-content='false'] .ss-btn{
width: 40px;
}

/*RESPONSIVE*/
@media (min-width: 768px) {
.ss-responsive .ss-btn-share,
Expand Down
2 changes: 1 addition & 1 deletion social-share.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1d63a88

Please sign in to comment.