css - Bootstrap responsive sidebar logo rendering on small devices -


I try to apply responsive sidebar menus with Bootstrap3 but I have problems rendering properly for small devices

The markup looks like

  & lt; div id = "sidebar" class = "col-md-3" & gt; // If instead of displaying this logo desktop & lt; A class = "logo_big" href = "& lt; php bloginfo ('url')? & Gt; /" title = "& gt; php bloginfo ('name')? & Gt;" rel = "homepage" & Gt; & Lt; Img class = "img-responsive" src = "& lt ;? php echo get_template_directory_uri () ;? & gt; /library/images/logo.jpg" & gt; & Lt; / A & gt; & Lt; div class = "sidebar-nav" & gt; & Lt; Div class = "navbar navbar-default" role = "navigation" & gt; & Lt; Div class = "navbar-header" & gt; & Lt; Button type = "button" class = "navbar-toggle" data-toggle = "collapse" data-target = "sidebar-navbar-fall" & gt; & Lt; span class = "sr-only" & gt; Toggle Navigation & lt; / Span & gt; & Lt; Span class = "icon-bar" & gt; & Lt; / Span & gt; & Lt; Span class = "icon-bar" & gt; & Lt; / Span & gt; & Lt; Span class = "icon-bar" & gt; & Lt; / Span & gt; & Lt; / Button & gt; & Lt; Span class = "visible-sm navbar-brand" & gt; // If the mobile or tablet gives us this logo & lt; Class = "block-title navbar-brand" href = "& lt ;? php bloginfo ('url')? & Gt;" title = "& gt; php bloginfo ('name')? & Gt; rel = "Homepage" & gt; & Lt; Img class = "img-responsive logo" src = "& lt ;? php echo get_template_directory_uri () ;? & gt; /library/images/logo.jpg" & gt; & Lt; / A & gt; & Lt; / Span & gt; & Lt; / Div & gt; & Lt; div class = "navbar-collapse collapse sidebar-navbar-collapse" & gt; & Lt ;? Php bones_main_nav (); ? & Gt; & Lt; / Div & gt; & Lt ;! - /. Nav-collapse - & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div id = "right_sidebar_widgets" & gt; & Lt ;? php dynamic_sidebar ('sidebar 1'); ? & Gt; & Lt; / Div & gt; & Lt; / Div & gt;   

And here I have a custom CSS to present the logo, but the desired

  .logo {display: none; } @ Media screen and (max-width: 800 pixels) {a.logo_big {display: none; } .logo {max-width: 145px; Status: Relative; Correct: 25px; Bottom: 25px; }}   

Enter image details here

It is important to understand that max-width: 145px; As long as width is specified,

The maximum-width CSS property is used to determine the maximum width of a given element. This prevents the value of the use of the property that is larger than the specified value for maximum-width.

You also need to set the logo's display property in order to show it.

Try:

  .logo {display: none; } @ Media screen and (max-width: 800 pix) {a.logo_big {display: none; } .logo {width: 145px; Status: Relative; display: inline-block; / * & Lt; --- set to display / / right: 25px; Bottom: 25px; }}    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -