twitter bootstrap - CSS class hidden-xx don't works on the boundary width value -
i'm creating form using responsive design using bootstrap. goal make such input slider type on mobile devices, , text type on medium devices , bigger.
for reason i'm using different classes in 2 divs show , hide content depending on device screen width (e.g. hidden-xs, hidden-sm, hidden-md, hidden-lg).
<div class="form-group hidden-sm hidden-md hidden-lg"> <!-- input type slider mobile devices --> </div> <div class="form-group hidden-xs"> <!-- input type text wider screen devices --> </div> i have @media rule in css file:
@media (min-width: 768px) { .sm-view { display: none; } } @media (max-width: 767px) { .lg-view { display: none; } } it works expected, except on boundary width value of 767px, on width both divs visible:
as increase width value 768px slider hides, , when set width value 766px input field hides.
what i'm doing wrong?
upd here working example: https://jsfiddle.net/rnurxbw9/1/
here window width different, can see on screenshot:
you're not letting know bootstrap version you're using. @ documentation v4 documentation or v3 documentation
if you're using bootstrap shouldn't need set css manually. try adding visible-sm class 1 you're trying show on larger devices.
<div class="form-group hidden-sm hidden-md hidden-lg"> <!-- input type slider mobile devices --> </div> <div class="form-group hidden-xs visible-sm"> <!-- input type text wider screen devices --> </div> 

Comments
Post a Comment