Jump to content
mgwaters

Responsive Banner Images & Navigation Menu?

Recommended Posts

mgwaters    1
mgwaters

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

 

http://nestacupuncture.com/acupuncture/our-treatments/nest-babies/

 

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.

 

#nav, #navbar {
background-color:#C8BCAC;
-moz-box-shadow: 0 0 3px #C8BCAC;
-webkit-box-shadow: 0 0 3px #C8BCAC;
box-shadow: 0 0 3px #C8BCAC;
font-family:Arial, Helvetica, sans-serif;
}
#navbar .navbar-inner{
background-color:#C8BCAC;
}
.navigation_wrap, .main_nav_container{
	background-color: #C8BCAC;
	/* height: 55px; */
		height: 3.929em;
}

ul#menu-nav {
margin: 0 0 0 10px;	
}

#page .sf-menu li a, #page ul.sf-menu a:focus, #page .sf-menu a:hover, #page .sf-menu a:active, #page .main-nav a {
	background: none repeat scroll 0 0 #C8BCAC;
	font-family: Arial, Helvetica, sans-serif;
	letter-spacing: 1px;
	text-transform: uppercase;
/*	padding-top: 20px; */
	padding-top: 1.429em;
/*	font-size: 95%; */
	font-size: 1.0em;
	font-weight:500;
	margin: 0 1.286em 0 1.286em;
	/* margin: 0 18px 0 18px; */
}

#page .sf-menu li a, #page ul.sf-menu a:focus, #page .sf-menu a:hover, #page .sf-menu a:active, #page .main-nav a {
    color: #FFFFFF;
	font-family:Arial, Helvetica, sans-serif;
}
li {
  /*  line-height: 21px; */
	line-height: 1.500em;
}

.site_tagline {
/*	width: 260px; */
	float: left;
}

.section-branding .mainlogo-img {
    display: block;
/*    max-width: 142px; */
/*	margin: 20px 70px 30px 180px; */
		margin: 1.429em 5.000em 2.143em 12.857em;
	float:left;
}
.social_links {
float:left;	
z-index:99;
/* margin: 0 0 0 40px; */
margin: 0 0 0 2.857em;
}

 

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.

 

 

post-23728-0-81434600-1356638416_thumb.p

post-23728-0-05837900-1356638432_thumb.p

post-23728-0-06011000-1356638439_thumb.p

Share this post


Link to post
Share on other sites
James B    436
James B

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


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • lionel1
      By lionel1
      Hi,
      I use on my home page " impulse module " but when i look on my iPhone the image is cut and not responsive .
      i only have this problem with this module not with the other one .
      thanks for ur help
      website / www.elonakane.com 
      Lionel 
       
    • kwaoru
      By kwaoru
      Hi,
       
      I have been using DMS and pagelines.
      I am facing to a huge trouble with the appearance of one of my page on mobile (smart phones) built with pagelines.
      However I haven’t come to any solutions to organise either edit the appearance of mobile view to look neat or deactivate the responsive function. 
      Now it looks totally messy on the phone...
       
      1. Is there any way to edit the appearance of the mobile version (responsive theme)?
      2. Is there any way to deactivate responsive function?
       
      If I could receive support from you to go thorough this process I would be happy to be a pro member. 
       
      Looking forward to hearing from you.
    • Paul
      By Paul+
      I have woocommerce store, product shows title and price fine until reduce screen with on a tablet/mobile phone the price and title gets removed?  Any ideas? 
      Here's an example page: https://thelaptopfixers.com/product/operating-system-re-install/
      Try it on both desktop PC browser then resize to mobile/cell phone size!  
      Thanks
    • kwaoru
      By kwaoru
      Hi,
      I desperately need to deactivate the responsive function on mobile for reasons. It looks so messy with the responsive look on mobile and not navigating or informative at all as it is. 
      I searched for solutions online and tries some of those that I found but nothing worked out. Also I found a previous post on this forum says that this theme pagelines DMS is not meant to be build to deactivate the responsive function... 
      Also tried with widget such as WPtouch to edit the mobile look a little more informative but as I am using "single page" theme on pagelines, the frontpage(main page) never appears on those app.
      Seems like not compatible?
      If there is no way to deactivate responsive function or I'll have to recreate another page just dedicated for a mobile page? or change the theme completely and build a page from scratch?
      I have been searching for this for two days already...
      Could anyone wise and kind out there, please help me?
       
      Thanks,
    • bnapoli
      By bnapoli+
      http://731.34b.myftpupload.com/ this website is using the NavPro navigation in Platform 5. It has a lot of menu items, so it breaks to two lines when the window is sized down. What is the media query to make the navigation either a) switch to "mobile mode" at a higher width, or b ) expand the nav into two lines. Thanks
×