Jump to content


Photo
- - - - -

Responsive Banner Images & Navigation Menu?

responsive images navigation

Best Answer James B , 27 December 2012 - 10:36 PM

Hi there,

 

If you've added the images using a hook and they have a static px width then they won't re-size responsively. The responsive layout will try and stack them on top of one another as the browser re-sizes so they best fit the screen.  The best way to avoid this would be to disable the mobile view so the items don't stack. In order to get the images to then re-size for the smaller screen you'll need to use some browser specific css on the images. You can download the browser specific css plugin for free from the pagelines store and use the @media prefix for mobile devices. The result will be something like the example below

 

 
@media(max-width: 480px) {
.site_tagline {
    float: left;
    max-width:50px;
}
}

 

The navbar is acting responsively for the layout, as the width reduces the items stack under one another to fill the available space, the background color for the nav isn't resizing with the li elements, so you can combat that using the below css and placing your chosen color value in.

 

 
.navigation_wrap, .main_nav_container {
    background-color: #C8BCAC;
    height: 100% !important;
}

Hope this helps

Go to the full post


  • Please log in to reply
1 reply to this topic

#1 mgwaters

mgwaters

    Advanced Member

  • Members
  • 35 posts

Posted 27 December 2012 - 08:08 PM

Hello All,

 

I'm having difficulty with my header/banner within my Pagelines Framework. My two main issues are:

 

1) The 3 images in the Header do not re-size when I re-size the FF/Safari/Chrome browser. The two images to the left and right of the logo were added using a hook within the functions.php file (see attached image)

2) The navigation menu also does not re-size

 

Please Login or Register to see this Hidden Content

 

My Settings:

Layout Handling: Responsive w/ Pixel Width

Site Design Mode: Full Width Sections

Header Sections: Branding, Classic Nav, Secondary Nav

 

The following is my css code for the classic nav and the banner images. As you can see, I started with px declarations and tried to switch to em to fix the responsive issue. I basing the em sizes on a base font size of 14px. The below is placed within my child theme in the style.css file.

 

Please Login or Register to see this Hidden Content

 

I have the "Disable Mobile View" UNCHECKED. I tried checking it, and while it looked somewhat better on the iPhone, it did not fix the fact that the banner images & nav were not resizing.

 

Can someone point me in the right direction?

 

Any help is greatly appreciated! Thank you.

 

 

Attached Files



#2 James B

James B

    Advocate

  • Members

  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 27 December 2012 - 10:36 PM   Best Answer

Hi there,

 

If you've added the images using a hook and they have a static px width then they won't re-size responsively. The responsive layout will try and stack them on top of one another as the browser re-sizes so they best fit the screen.  The best way to avoid this would be to disable the mobile view so the items don't stack. In order to get the images to then re-size for the smaller screen you'll need to use some browser specific css on the images. You can download the browser specific css plugin for free from the pagelines store and use the @media prefix for mobile devices. The result will be something like the example below

 

Please Login or Register to see this Hidden Content

 

The navbar is acting responsively for the layout, as the width reduces the items stack under one another to fill the available space, the background color for the nav isn't resizing with the li elements, so you can combat that using the below css and placing your chosen color value in.

 

Please Login or Register to see this Hidden Content

Hope this helps







Also tagged with one or more of these keywords: responsive, images, navigation