Jump to content
Steve Webb

Help with responsive divs

Recommended Posts

Steve Webb

Hi.

I am wondering if someone can help me.

I have some buttons on a page in my site that are driving me crazy.

Here is the page:

http://mattro.se/contact/

The Linkedin and Instagram buttons (divs) are supposed to be side by each, and continue to be side by each until the browser is so small that the containing div slips under the message box.  Right now, the 'linkedin button is slipping under the IG button long before  the containing div slips under.

Can someone PLEASE show me what im doing wrong here?

 

Here is the page code:

<div class="row"><div class="span12 well"><h1 class="contact">Pen me a letter</h1>[contact-form-7 id="460" title="Contact form 1"]</div>
</div>

<!--THIS IS THE CONTACT FORM 7 CODE-->

<div class="row"><div class="span4">
<p>Name (required)<br />
    [text* your-name] </p>

<p>Email (required)<br />
    [email* your-email] </p>

[checkbox WorkEnquiry "Work Enquiry"]

<p>Subject<br />
    [text your-subject] </p>

<p class="hidden-desktop">Message
[textarea messagemobile]</p>
<p class="hidden-desktop">[submit "Send"]</p></div>

<div class="span8"><div class="phone well hidden-desktop hidden-tablet"><a href="javascript:void(0)" onclick="window.location='tel:+12505807673'" title="Call me" class="tel"><h1><em class="icon-phone icon-2x"></em></h1></a></div>
<div class="row contact"><div class="span6 instag well"><a href="http://instagram.com/matroas" target="blank"><h1><em class="icon-camera-retro icon-2x"></em></h1></a></div>
<div class="span6 linkedin well"><a href="http://ca.linkedin.com/in/matroas" target="_blank"><h1><em class="icon-linkedin icon-2x"></em></h1></a></div>
</div>
<p class="fredquote hidden-phone hidden-tablet">"The connections we make in the course of a life - maybe that's what heaven is.  We make so many connections here on earth. Look at us; I've just met you, but I'm invested in who you are and who you will be, and I can't help it."
~ Fred Rogers</p>
</div>
</div>
<p class="hidden-phone hidden-tablet">Message<br />
    [textarea your-message] </p>

<p class="hidden-phone hidden-tablet">[submit "Send"]</p>

 

And here is the pertinent CSS:

 

.row.contact {
  min-width:100px;
}

.linkedin.well {
  margin:21px 5px;
  min-height:0;
  padding:0;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-touch-callout: none;
  position:relative;
  min-width:50px;
}

.linkedin.well:hover {
  background:DarkSeaGreen;
  -webkit-transition: all 0.25s;
  -moz-transition: all 0.25s;
  -ms-transition: all 0.25s;
  -o-transition: all 0.25s;
  transition: all 0.25s;
}

.linkedin.well:hover h1 {
  -webkit-transition: all 1s;
  -moz-transition: all 1s;
  -ms-transition: all 1s;
  -o-transition: all 1s;
  transition: all 1s;
  color:white;
}

.linkedin.well h1 {
  margin:0;
  text-align:center;
  color:DimGray;
}

.phone.well {
  margin:21px 5px;
  min-height:0;
  padding:0;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-touch-callout: none;
}

.phone.well:hover {
  background: blue;
  -webkit-transition: all 0.25s;
  -moz-transition: all 0.25s;
  -ms-transition: all 0.25s;
  -o-transition: all 0.25s;
  transition: all 0.25s;
  color:white;
}

.phone.well:hover h1 {
  -webkit-transition: all 1s;
  -moz-transition: all 1s;
  -ms-transition: all 1s;
  -o-transition: all 1s;
  transition: all 1s;
  color:white;
  text-align:center;
}

.phone.well h1 {
  margin:0;
  text-align:center;
  color:DimGray;
}

.instag.well {
  margin:21px 5px;
  min-height:0;
  padding:0;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-touch-callout: none;
    min-width:50px;
}

.instag.well:hover {
  background: DarkOliveGreen;
  background: Tan;
  -webkit-transition: all 0.25s;
  -moz-transition: all 0.25s;
  -ms-transition: all 0.25s;
  -o-transition: all 0.25s;
  transition: all 0.25s;
  color:white;
}

.instag.well:hover h1 {
  -webkit-transition: all 1s;
  -moz-transition: all 1s;
  -ms-transition: all 1s;
  -o-transition: all 1s;
  transition: all 1s;
  color:white;
  text-align:center;
  margin:0;
}

.instag.well h1 {
  margin:0;
  text-align:center;
  color:DimGray;
}

p.fredquote {
  font-family:'Reenie Beanie', cursive; 
  font-size:26px;
  color:grey;
  padding:0 0 20px 0;
  line-height:1.5em;
}

h1.contact {
  font-family: 'Pacifico', cursive;
  text-transform:none;
  font-size:55px;
  margin:0 0 15px 0;
  font-weight:lighter;
  color:DimGray;
}

 

Please help!!

Thanks so much!

 

-m

Share this post


Link to post
Share on other sites
batman

Hi Matt

I see this rob´s reply in the forum 

 

"When using any dimension in px, the size is fixed, not responsive.  Your choices for responsive are percentages and em.

For example you can be changed by converting -400px to -25em.  For future reference, you may find this link helpful. http://pxtoem.com/

Keep in mind, you may have other aspects of these boxes set in non-responsive measurements. Please inspect them using Firebug or Chrome's Inspection Tool and customize your code accordingly. "


Life is too short to remove USB safely ...

Share this post


Link to post
Share on other sites
Steve Webb

Batman,

 

Thanks for the reply, but I still don't get it.

Where should I make sizes in em or %?

Im really confused.  The responsive design is working other places like here: mattro.se/music/ but not on this contact page.

Right now I can barely resize the window without the linkedin button going under the IG button.

Its in the pl grid system, so I thought it would be working like it does elsewhere..

Can anyone help me make sense of this?

Thanks in advance!

-m

Share this post


Link to post
Share on other sites
Danny

Hi,

 

Unfortunately, we are unable to provide support to user created custom code. However, your issue is most likely caused by the margins you have added to the buttons in the span, as you have added these button classes to the actual span6 div.

 

At the moment you have this:

 

<div class="span6 instag well">

 

I would recommend you try doing the following:

 

<div class="span6">

<div class="instag well">

 

And see if that works.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Steve Webb

That worked!!

Thanks so much you guys.

You're all awesome.

I love pagelines.

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

    • Michael Kummer
      By Michael Kummer+
      Hi guys!
      I have noticed that my primary sidebar becomes intermittently invisible when browsing through various blog articles on michaelkummer.com/blog.
      See:
      https://www.dropbox.com/s/z646sgoa3mfjl1j/Screenshot 2018-07-12 15.57.46.jpg?dl=0 and https://www.dropbox.com/s/vdledzzgginvwgv/Screenshot 2018-07-12 15.57.57.jpg?dl=0
      Upon refresh, the sidebar appears. I have been using the following CSS code to hide the sidebar on mobile without any issues. 
      @media only screen and (max-width: 993px) {
      /* hide sidebars */
           .plsb {
              display: none !important;
          }
      }
      I tried to add the following CSS to force the sidebar to show on screens that are wider than 994 pixels but to no avail. Any clue what could be causing this issue?
    • Michael Kummer
      By Michael Kummer+
      Hi guys!
      I am using the LESS/CSS Pagelines extension and tried to add the following code to make use of FontAwesome:
      a.c2a:before {
          content: "\f07a\00a0";
          font-family: "Font Awesome 5 Pro";
          Font-weight: 900;
          font-style: normal;
          font-weight: normal;
          text-decoration: inherit;
          padding-left: 4px;
      }
       
      The issue is that as soon as I have the CSS via the Custom Styling text box, Pagelines (or the extension) strips out the backslashes (\). As a result, I had to abandon the CSS/LESS extension and instead add all my CSS code to a separate .css file.
      Is there a fix or workaround for this?
      Thanks
      Michael
    • glyph.marketing
      By glyph.marketing+
      Hello, I am having a problem similar to that experienced by Michael Kummer here. We have pages that show this automatic scrolling issue (examples here and here) and it is sufficiently annoying that we have seen customers bounce while trying to convert. Strangely, it only happens at specific resolutions, so it can be difficult to reproduce. In general we can only consistently reproduce it on a 4k resolution with a browser width between 1517 and 1536px. 
      Thanks to Michael Kummer's help we were able to set the overflow-anchor property to none in the entire body, which fixed the issue as far as we can tell, but also obviously disabled scroll anchoring for the whole site. I tried applying it to the specific element that looked like it was being reloaded, which was the PL Meganav extension, but that was unsuccessful. 
      Can anyone help us figure out which element or ID we can apply this property to, so that we can fix the scrolling issue but not disable scroll anchoring for the entire site?
      Thank you - 
      Glyph Language Services
    • chamois_blanc
      By chamois_blanc+
      Hello,
      Shouldn't the image PL5 component be using the srcset/picture css directives to pick the correct size for an image? or it does already and I don't know how to use it? Thank you for any advice or enlightenment.
    • stijnxo
      By stijnxo+
      Is there a way to disable the responsive function of your iBoxes?
      I do not want all iBoxes underneath each other on mobile, is there a way to fix columns or group boxes?
      I use them for small links and want them to stay next to each other, see attachment
      Please let me know.



×