Skip to content

Commit 10b8b59

Browse files
author
Michael Lancaster
committed
removed floats to stop cause breakdowns on the layout when resized, added display inline block to work properly as responsive. added text overflow at the github project description.
1 parent f719d76 commit 10b8b59

File tree

3 files changed

+31
-14
lines changed

3 files changed

+31
-14
lines changed

assets/base.css

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
/* Github Box */
22

3+
.github-box-wrap {
4+
display: inline-block;
5+
width: 46%;
6+
margin-right: 0.6em;
7+
margin-left: 0.6em;
8+
margin-bottom: 2em;
9+
}
10+
311
.github-box {
412
font-family: "Helvetica Neue", Arial, sans-serif;
513
background: #fafafa;
614
border: 1px solid #ddd;
715
color: #666;
816
border-radius: 5px;
9-
float: left;
10-
margin-right: 1.2em;
11-
margin-bottom: 2em;
12-
width: 46%;
17+
width: 100%;
1318
}
1419

1520
.github-box a {
@@ -92,6 +97,10 @@
9297

9398
.github-box .github-box-content p {
9499
margin: 0;
100+
width: 100%;
101+
white-space: nowrap;
102+
overflow: hidden;
103+
text-overflow: ellipsis;
95104
}
96105

97106
.github-box .github-box-content .repo-link {
@@ -153,4 +162,13 @@
153162
border-bottom-color: #9fc7db;
154163
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
155164
opacity: 1;
156-
}
165+
}
166+
167+
/* breakpoint content-driven */
168+
@media all and (max-width: 678px) {
169+
.github-box-wrap {
170+
display: block;
171+
width: inherit;
172+
margin-right: 0;
173+
}
174+
}

demo/css/style.css

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ h1 {
2323
}
2424

2525
.title {
26-
width: 700px;
26+
width: 90%;
2727
margin: 0 auto;
28-
padding-right: 35px;
2928
}
3029

3130
.title p {
3231
text-align: center;
32+
margin-bottom: 40px;
3333
}
3434

3535
.credits {
3636
margin: 0 auto;
37-
width: 700px;
37+
width: 90%;
3838
text-align: center;
3939
clear: both;
4040
}
@@ -56,9 +56,8 @@ h1 {
5656
}
5757

5858
.projects{
59-
width: 700px;
59+
width: 90%;
6060
margin: 0 auto;
61-
padding: 30px;
6261
}
6362

6463
/* Font-face */

demo/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ <h1>jQuery Github</h1>
2424
</div>
2525

2626
<div class="projects">
27-
<div data-repo="jquery-boilerplate/boilerplate"></div>
28-
<div data-repo="zenorocha/diveintohtml5"></div>
29-
<div data-repo="zenorocha/jquery-github"></div>
30-
<div data-repo="zenorocha/hub.me"></div>
27+
<div data-repo="jquery-boilerplate/boilerplate" class="github-box-wrap"></div>
28+
<div data-repo="zenorocha/diveintohtml5" class="github-box-wrap"></div>
29+
<div data-repo="zenorocha/jquery-github" class="github-box-wrap"></div>
30+
<div data-repo="zenorocha/hub.me" class="github-box-wrap"></div>
3131
</div>
3232

3333
<p class="credits">Made with love by <a href="http://zenorocha.com">Zeno Rocha</a>.</p>

0 commit comments

Comments
 (0)