Skip to content

Commit 3432958

Browse files
committed
Flexbox funky padding demo in Safari for desktop.
1 parent 13affb7 commit 3432958

2 files changed

Lines changed: 54 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ with.
1010

1111
## My JavaScript Demos - I Love JavaScript!
1212

13+
* [Desktop Safari Seems To Add Extra Padding To CSS Flexbox Item Inside List Item](https://bennadel.github.io/JavaScript-Demos/demos/safari-li-flexbox-wonky/)
1314
* [Trying To Center A Text-Overflow Ellipsis Using CSS Flexbox In Angular 7.2.15](https://bennadel.github.io/JavaScript-Demos/demos/center-ellipsis-angular7/)
1415
* [Revisiting: Styling A Movie Cast List Using A Definition List And Flexbox](https://bennadel.github.io/JavaScript-Demos/demos/cast-list-flexbox2/)
1516
* [Styling A Movie Cast List Using A Definition List And Flexbox](https://bennadel.github.io/JavaScript-Demos/demos/cast-list-flexbox/)
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
6+
<title>
7+
Desktop Safari Seems To Add Extra Padding To CSS Flexbox Item Inside List Item
8+
</title>
9+
</head>
10+
<body>
11+
12+
<h1>
13+
Desktop Safari Seems To Add Extra Padding To CSS Flexbox Item Inside List Item
14+
</h1>
15+
16+
<!-- A simple Flexbox container in the DOM. -->
17+
<div class="flexbox-container">
18+
<span class="flexbox-item1">I am the first item</span>
19+
<span class="flexbox-item2">I am the second item</span>
20+
</div>
21+
22+
<ul>
23+
<li>
24+
25+
<!-- The SAME simple Flexbox container, this time in a UL/LI context. -->
26+
<div class="flexbox-container">
27+
<span class="flexbox-item1">I am the first item</span>
28+
<span class="flexbox-item2">I am the second item</span>
29+
</div>
30+
31+
</li>
32+
</ul>
33+
34+
<style type="text/css">
35+
36+
.flexbox-container {
37+
display: flex ;
38+
}
39+
40+
.flexbox-item1 {
41+
border: 2px solid red ;
42+
white-space: nowrap ;
43+
}
44+
45+
.flexbox-item2 {
46+
border: 2px solid blue ;
47+
white-space: nowrap ;
48+
}
49+
50+
</style>
51+
52+
</body>
53+
</html>

0 commit comments

Comments
 (0)