Responsive Design

Responsive Design

I wanted to make header hight responsive so I used this one:
PHP:
.MyContent {
float: right;
}

<xen:if is="@enableResponsive">
    @media (max-width:800px) {
        .MyContent {
        float: none;
        text-align: center;
        }
    }
</xen:if>

and changed it a bit to look like this:
PHP:
#header
{
    height: 400px; 
} 

<xen:if is="@enableResponsive">
    @media (max-width:640px) { 

       #header {
 
    height: 200px; 
    } 

    }
</xen:if>

It seems to be working but still wanted to ask if my implementation is correct/good?
 
Yes, that will work.

The header height will be 400px until the the width drops below 640px, at which point it will be 200px.
 
Hi Brogan

Could you please let me know if this code is ok?
Code:
<xen:if is="@enableResponsive">
    @media (max-width:800px) {
        <xen:hook name="header_right_big" />
        }

    @media (max-width:610px) {
        <xen:hook name="header_medium" />
    }

    @media (max-width:480px) {
        <xen:hook name="header_small" />
        }
</xen:if>

Thank you!
 
Do I have the correct usage of the predefined CSS classes ...

HTML:
<div class="visibleResponsiveFull visibleResponsiveWide">
  <div id="bsap_1286480" class="bsarocks bsap_a7ac845a1568bf4e1a00976b9a439ae5"></div>
</div>

Desired Outcome: My BuySellAds 728x90 banner ad's will only display if the client browser display is within Full or Wide specifications, and the banner ad will not show for Medium and Small dimensions client browsers.

Thanks.
Have you been able to get a solution?
 
The main resource explains how to to do it using media queries or the predefined classes.

If you want to hide something at the narrow width for example you use:
Code:
<div class="hiddenResponsiveNarrow">
    Content here
</div>
 
Upnet dumb question #80:
Can I use <xen:if is="@enableResponsive"> in an ad_template and have it show an <img> if the page is not responsive?
 
Last edited:
Aha I read the previous couple of posts and figured out to use the class <div class="visibleResponsiveFull">
 
Wrap the text in a div with a named class.

Use a media query to display:none at the desired width.
 
Lads,

If I want to show a menu button only on something bigger than tablet screens, am I using the following?

<xen:if is="@enableResponsive">
@media (max-width:800px) {
.MyContent {
float: none;
text-align: center;
}
}

STICK MY CONTENT HERE FOR MOBILE?
</xen:if>

I don't think I understand it.
 
You need hide the div for the button on screens lower than 800px, using display none or one of the predefined classes.
 
sorry to bump an old thread..

Ive just done an upgrade.. my theme has taken well... however I have noticed add reply background to the editor is not responsive..

Would anyone be able to point me in the right direction of what template / css sheet to edit to fix this ?

scm.webp
 
That doesn't appear to be the default editor.

You would need to seek support from the style or add-on author.
 
That doesn't appear to be the default editor.

You would need to seek support from the style or add-on author.

It's the same issue with the default editor too.

It's not the editor that's the problem but the background box the editor is placed in..
 
Top Bottom