Responsive Design

Responsive Design

@Brogan, sorry but that does not mean anything to me, I have not yet picked up the lingo. I appreciate your help

I want to insert something along the lines of

background: @primaryLightish url('http://jetboaters.net/JetBoatersBanner.1920.jpg') no-repeat left;

Conditionally for WideWidth.

My ideal solution would be to use three if statements in logo_block to specify the specific logo image file. I believe that conditionally setting the value of @headerLogoPath would work.
 
This is taken directly from the resource content:
Code:
<xen:if is="@enableResponsive">
    @media (max-width:@maxResponsiveWideWidth) {
        .MyContent {
        color: red;
        }
    }
</xen:if>

Change .MyContent to whichever CSS class you want to work with, e.g. #logo img.
Then change color: red; to the actual CSS you want to apply, e.g. background: @primaryLightish url('http://jetboaters.net/JetBoatersBanner.1920.jpg') no-repeat left;

Resulting in:
Code:
<xen:if is="@enableResponsive">
    @media (max-width:@maxResponsiveWideWidth) {
        #logo img {
        background: @primaryLightish url('http://jetboaters.net/JetBoatersBanner.1920.jpg') no-repeat left;
        }
    }
</xen:if>
 
@Brogan, thank you.

I added the code to extra.css and now I see the following code in css.php in my browser.

@media (max-width:1450px) {
#logo img {
background: #65a5d1 url('http://jetboaters.net/JetBoatersBanner.1920.jpg') no-repeat left;
}

Unfortunately the logo does not change. I have tried reducing the max-width value.

The code below

@media (max-width:480px)
{
body #logo img
{
display: none;
}

body #logo span
{
background: #65a5d1 url('http://jetboaters.net/logoblack60.png') no-repeat left;
margin: 5px;
display: inline-block;
vertical-align: middle;
/* ← don't forget to set width and height */
width: 241px;
height: 60px;

}
}

Works for mobile logos.

Do I need to add

body #logo img
{
display: none;
}


Any suggestions?
 
Back
Top Bottom