
For some time I try to implement this when the anchor tag is inside the flexible container container with flex-wrap: nowrapand overflow:auto, now it works in google chrome, but it does not work in Safari for smaller screen sizes, since it is good like Iphone. Below is the code
<html>
<head>
</head>
<style>
.flex-div {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
-webkit-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
overflow-x: auto;
}
.flex-div a {
display: inline-block;
white-space: nowrap;
margin-left: 10px;
margin-right: 10px;
}
</style>
<body>
<div class="flex-div">
<a>Modern & contemporary</a>
<a>Modern & contemporary</a>
<a>Modern & contemporary</a>
<a>Modern & contemporary</a>
<a>Modern & contemporary</a>
<a>Modern & contemporary</a>
<a>Modern & contemporary</a>
<a>Modern & contemporary</a>
<a>Modern & contemporary</a>
<a>Modern & contemporary</a>
<a>Modern & contemporary</a>
<a>Modern & contemporary</a>
</div>
</body>
source
share