jquery - CSS div not to be width:100% -
i have 1 problem css.
i have demo page codepen.io .
in demo can see there click show button. when click button .notificatoncontainer
div opening successfully. want change .notificatoncontainer
div width:100%;
when browser screen @media , (max-width: 580px)
when change browser size width<580px
width:100%;
not working.
how can fix can me in regard ?
html
<div class="header-menu"> <div class="header-menu-wrap"> <div class="header-left"> </div> <div class="header-right"> <a href=""> <div class="home-page"> <div class="icon-header-home icon-home-1"></div> </div> </a> <div class="home-page"> <div class="icon-header-homea"></div> </div> <div class="home-page"> <div class="tter"> <span id='conversation_count_notification' class='not_count'></span> <div class="icon-header-home icon-bell aa">click show</div> <div class="notificationcontainer"> <div id="notificationtitle">some text</div> <div id="notifications" class="notifications"> <div class="some-content-related-div" id="notifications_container"> <a href=" " class="noti_a "> <div class="noti_stbody" id=" "> <div class="noti_stimg"> <img src=" " class='noti_face' alt=' ' /> </div> <div class="noti_sttext"> <div class="bildirilen_adi_bildirim_kimligi"> <div class="noti_username">fdsafasdf</div> <div class="notif_stat">fdsafasf</div> </div> <div class="bildirilen_mesaj">fdsfa</div> </div> </div> </a> </div> </div> <div id="notificationfooter"><a href="">show all</a></div> </div> </div> </div> </div> </div> </div> </div>
css
.notificationcontainer { min-width: 300px; background-color: #009688; -webkit-border-bottom-right-radius: 3px; -webkit-border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -moz-border-radius-bottomleft: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; overflow: hidden; position: absolute; left: 50%; transform: translate(-50%, 0); -webkit-transform: translate(-50%, 0); -o-transform: translate(-50%, 0); -moz-transform: translate(-50%, 0); margin-top: 41px; display: none; } @media , (max-width: 580px) { .header-left { width: 100%; padding-bottom: 5px; } .header-right { width: 100%; height:28px; } .home-page { width: 18%; margin-left: 0px; padding-left: 5px; padding-right: 5px; } .header-menu-wrap { padding: 0px; } .header-menu { padding-bottom: 0px; } .notificationcontainer{ position: absolute; right:0; left:0; /*changed here*/ min-width:100%; /*changed here*/ height:auto; z-index: 1000; font-size: 14px; text-align: left; background-color:#009688; -webkit-border-bottom-right-radius: 3px; -webkit-border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -moz-border-radius-bottomleft: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; overflow:hidden; margin-top: 50px; display:none; } }
your .notificationcontainer
has transform: translate(50% 0);
on it. in media query, need override transform: translate(0);
.
that should it.
Comments
Post a Comment