Skip to content

Commit 3de734b

Browse files
committed
Merge pull request #18 from dxn7335/master
Added styling to center inner-container in banner
2 parents 36d7ad0 + 0f1692c commit 3de734b

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

_sass/main.sass

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,14 @@ a
9696
position: relative
9797
width: 100%
9898
.inner
99-
left: 0
100-
right: 0
99+
position: absolute;
100+
left: 50%;
101+
top: 50%;
102+
min-width: 300px;
103+
transform: translate(-50%, -50%);
104+
-webkit-transform: translate(-50%, -50%);
105+
-moz-transform: translate(-50%, -50%);
106+
-o-transform: translate(-50%, -50%);
101107
// custom banners
102108
&.welcome
103109
background: url('coderit_background.png') center center fixed
@@ -108,7 +114,6 @@ a
108114
text-align: center
109115
.logo
110116
margin-bottom: 25px
111-
max-width: 60%
112117
#learn-more
113118
&:after
114119
border-color: $white transparent transparent transparent
@@ -371,4 +376,4 @@ a
371376
.inner
372377
padding: 10px 3px
373378
#event-list-cta
374-
width: auto
379+
width: auto

assets/css/main.css

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,14 @@ a {
7777
position: relative;
7878
width: 100%; }
7979
.banner .inner {
80-
left: 0;
81-
right: 0; }
80+
position: absolute;
81+
left: 50%;
82+
top: 50%;
83+
min-width: 300px;
84+
transform: translate(-50%, -50%);
85+
-webkit-transform: translate(-50%, -50%);
86+
-moz-transform: translate(-50%, -50%);
87+
-o-transform: translate(-50%, -50%);}
8288
.banner.welcome {
8389
background: url("coderit_background.png") center center fixed;
8490
font-size: 1.25em;
@@ -87,8 +93,7 @@ a {
8793
padding: 60px 0 80px;
8894
text-align: center; }
8995
.banner.welcome .logo {
90-
margin-bottom: 25px;
91-
max-width: 60%; }
96+
margin-bottom: 25px;}
9297
.banner.welcome #learn-more:after {
9398
border-color: white transparent transparent transparent;
9499
border-style: solid;

0 commit comments

Comments
 (0)