Jump to content
catpage

How to set logo right and social icons left?

Recommended Posts

catpage

Hi

 

I am having trouble getting a site logo to sit top right in the header and social icons top left...

 

It -almost- works by setting custom CSS for the logo:

.section-branding .mainlogo-link, .section-branding .mainlogo-img {float:right;}

and then 'branding options - social icons' Distance from the right in pixels to a large value such as 1000 (under 'site options' then 'header and footer')

 

The trouble with this approach is that the icons can be pushed off the edge of screen when narrowing the browser window or on a mobile platform...

 

Far from ideal anyhow. What would be a better way of achieving this?

  • Like 1

Share this post


Link to post
Share on other sites
greenfly

Hi Catpage - please could we have a link to your site? 


The answer to many issues can be found by searching in the forum before posting as someone else  may very well have had the same problem before you have.  Also, reading the documentation can help you gain a good understanding of how everything works. 

 

Please do not send me private messages. Occam's razor - The principle states "Keep things simple!"

Share this post


Link to post
Share on other sites
catpage

The site is on a development server and is not yet on a public facing URL.

 

So you can see what I mean here is an annotated screen-grab showing how the logo and social icons have had their positions reversed

 

swapped-header.jpg

Share this post


Link to post
Share on other sites
batman

Hi catpage

Please, you can try with, for example

 

.icons {margin-right: 68em;}
I believe that this is responsive when narrowing the browser window.

Life is too short to remove USB safely ...

Share this post


Link to post
Share on other sites
catpage

Hi Batman, a good idea and a bit better... The social icons do still mess up as the window is narrowed. Initially they 'stack' one above another then slide off the left of screen only to re-appear stuck to the edge of screen at about the point the navbar changes to 'mobile' mode...

 

There must be a way of positioning them so they stay put...?

Share this post


Link to post
Share on other sites
James B

Hi there,

 

You can give them absolute positioning.

 

 

.section-branding .icons {     bottom: 50%;     position: absolute !important;     right: 0; }

 


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
catpage

Hi James

 

I can't get your code to work. Changed to left:0 but still the social icons get positioned at the right of the header pretty much underneath the logo?

Share this post


Link to post
Share on other sites
greenfly

Catpage - could you take a screen shot of what happens when you use James' code please? 


The answer to many issues can be found by searching in the forum before posting as someone else  may very well have had the same problem before you have.  Also, reading the documentation can help you gain a good understanding of how everything works. 

 

Please do not send me private messages. Occam's razor - The principle states "Keep things simple!"

Share this post


Link to post
Share on other sites
catpage
.section-branding .mainlogo-link, .section-branding .mainlogo-img {float:right;}

.section-branding .icons {     bottom: 50%;     position: absolute !important;     right: 0; }

produces:

 

swapped-header2.png

 

There is no change when substituting right:0 for  left:0

I have tried not using the float:right but have not found an alternative that works.

Share this post


Link to post
Share on other sites
Rob

Hi,

 

If you go to Dashboard > PageLines > Site Options > Header And Footer you can adjust the horizontal position.  Check here on that settings panel:

Branding Section - Social Icon Position

 

Under: Distance From Right (in pixels)

 

Set the value to 800px to test it. That should move the social icons far left, leaving the branding on the right.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
catpage

Um, yes... this is where I started this thread; with a value of 1000 moving the social icons left. The thing is this is not a 'responsive' solution as they vanish from the page as the window is sized and I imagine on mobile platforms.

 

More recent posts have been looking for a css based solution (so the 'distance' entry fields to adjust the horizontal position in the panel are empty).

Share this post


Link to post
Share on other sites
Rob

Most of the custom CSS solutions are not to reposition, but to replace and position unique social icons.  Have you considered just going that route?


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
catpage

I think you are suggesting disabling the 'default' social icons and coding some custom ones is that correct?  I imagine this should give better control if there is no way of handling the default ones better when they are displayed on the left..

Share this post


Link to post
Share on other sites
Rob

Okay,

 

I found this CSS:

.section-branding .icons {
    bottom: 50%;
    height: 24px;
    line-height: 20px;
    position: absolute;
    right: 0;
    text-align: right;
}

If I change position to "relative" instead of absolute, and add "float: left;"  then the icon moves flush left in the header.  Ignore, please my other settings as they're custom, most likely, to my site.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
catpage

Nope - still no good for me. Looks like the second screengrab above. Icons remaining resolutely on the right under the logo.

 

Perhaps there is an interaction with the way the logo is positioned?

 .section-branding .mainlogo-link, .section-branding .mainlogo-img {float:right;}

Share this post


Link to post
Share on other sites
Rob

Without seeing a live site, it's impossible to identify if there's some other element affecting this.  It's like trying to perform brain surgery in a dark room with sunglasses on.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
catpage

A scary analogy!

 

If you try to reverse social icons and logo on a 'default' site what works for you AND retains fluid layout?

Share this post


Link to post
Share on other sites
Rob

Well, that code I gave you was tested and worked with the changes I stated had to be made.  Depending on the size of your branding image, that should align right easily.

 

Yes, it is a scary analogy. But without seeing a live site to check, that's what it is, really. Diagnosis and surgical solutions in the dark. Scary? Frightening! :D


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
catpage

Hi Rob

 

As I understand it the code you show above sets your social icons to the left.  What code are you using to set the logo to the right?

Share this post


Link to post
Share on other sites
Rob

I did not do that as you said that was working.

 

If you use Firebug to find these elements, or Chrome's Inspection Tools, that will help you do this much faster and easier:

I found this:

.section-branding .mainlogo-link, .section-branding .mainlogo-img {
    displayblock;
    max-width100%;
}

 

I added:

    floatright;
 

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
catpage

OK - a bit more digging and it looks like

.section-branding .icons { right:0px; }

in pagelines-compiled-css is the problem.

 

What I need to do is clear this as opposed to override it with another value using inline css which just moves the icons away from the right edge but is not usefully 'responsive'. Not sure how one clears such a declaration and clear:right; is not hacking it...

 

Very surprised though that your approach works Rob as you still have right:0px set above applied to the social icons that need to go left!

Share this post


Link to post
Share on other sites
James B

Hi there,

 

I've just gone into the options in Pagelines>site options>header and footer and removed the figures in the admin panel so it was blank and saved. Then checked to see if the inline figures were removed, they were. So added my own css to change the float the and align the icons. The final result I got they stayed within the container when responsive.

 

http://screencast.com/t/fTAbbvZfCB

 

I've only been testing this quickly but the css I used for the layout on my text site is below.

 
a.site-title {
    display: block;
    float: right;
}

.section-branding .icons {
    bottom: 50%;
    float: left !important;
    position: absolute;
    width: 100%;
}

.section-branding .icons a {
  float: left;}


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
catpage

Thanks James - Working now!

 

I did have to change one class referenced in your code to move the site logo right-

instead of:

a.site-title {
    display: block;
    float: right;
}

 

I have:

.mainlogo-img {
    display: block;
    float: right;
}

Share this post


Link to post
Share on other sites
James B

Excellent, glad you got it working :-)


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

    • 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
    • mtaus
      By mtaus+
      Just did a clean install of Platform 5 at myedadvisor.com and the icons in Pagelines are not displaying (screenshot attached).

    • 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.
    • Paul
      By Paul+
      I was surprised to see I had no menu today - out of the blue - its actually moved to the bottom of the page!  After hours of fiddling and disabling every single plugin, leaving just plagelines the issue is still present.  See video for a basic text box - I moved it into the head and it jumps to the bottom and shows just above the footer but below the main content.  I have a temp fix by placing the menu into the first row on the main content but it does mean other than my home page, all other pages have no menu.  A quick fix is very urgent for this bug.
      https://thelaptopfixers.com
       
       
    • russe-intensif
      By russe-intensif+
      Hi team,
      checking my site today, i'm surprised to see my MegaNav all in bottom of the pages, while it's in header.
      After getting to change it in couple of pages onto Template part (too time consuming !), i'm desperate and ask you for help :-)
      apprendre-le-russe-avec-ania.fr
      Thank you in advance !

×