Jump to content
catpage

How to set logo right and social icons left?

Recommended Posts

catpage    1
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    230
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    1
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    389
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    1
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    436
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    1
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    230
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    1
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    547
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    1
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    547
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    1
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    547
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    1
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    547
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    1
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    547
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    1
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    547
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    1
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    436
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    1
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    436
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

    • lionel1
      By lionel1
      Hi,
      i try to put some images (Logos) in the Agency module / clients module section
      But i only can put 6 logos though the module propose to add more item
      Thanks for ur help
      Lionel 
      Capture d’écran 2017-06-27 à 20.55.27.png 
    • Michael Kummer
      By Michael Kummer+
      Hi guys,
      every since Chrome introduce scroll anchoring (see chrome://flags) blog posts on my page start scroll automatically as soon as the user scrolls down a bit. It is super annoying and I don't know exactly what triggers the incompatibility with Chrome's latest feature that is supposed to improve usability.
      Since I don't know what causes it (Pagelines, or a Plugin), I would like to disable the feature using a CSS override that Google describes as follow:
      "Scroll anchoring aims to be the default mode of behavior when launched, so that users benefit from it even on legacy content. A CSS property overflow-anchor can disable scroll anchoring in part or all of a webpage (opt out), or exclude portions of the DOM from the anchor node selection algorithm. This property supports the following values when applied to an element E:
      overflow-anchor: auto (the default value) declares that the DOM subtree rooted at E is eligible to participate in the anchor node selection algorithm for any scrolling box created by E or an ancestor of E. overflow-anchor: none declares that the DOM subtree rooted at E is not eligible to participate in the anchor node selection algorithm for any scrolling box created by E or an ancestor of E." Do you guys happen to know how to use that property with the ROOT element so it applies to the whole page?
      Thanks
      Michael 
    • wyo22ski
      By wyo22ski+
      Hello,
       
      I'm basically a designer and understand a little on how to change CSS, etc., so please excuse my ignorance...  I recently upgraded to the newest platform from the DMS and my old DMS theme no longer functions.  I'm trying to replace the image slider that my Horizon Photography Theme (Nick Haskins) had created.  The Impulse image slider seemed the closest to what I need, but there are problems.
      It seems the the Impulse section for sliding images defaults to the image width, no the height.  I can change the Impulse stage height and width, but this does nothing to the internal content.  For instance, if I change the height to 200 pixels, the image remains the full width and only shows a cropped section.  I would like the ability to change the Impulse height, and have the image height fit space. 
      I've put this custom CSS in, but again, this only controls the stage height of Impulse:
      .pl-sn-impulse .pl-impulse-cell .cell-wrap, .pl-impulse-container, .owl-stage-outer {
        width: 100%;
      }
       
      Any suggestions welcome.  Thanks 
    • Objectif-Mariage
      By Objectif-Mariage+
      Hello. 
      I have just realized that CSS (Less plugin) , is not working..... I have disable all plugins (except PL CUSTOM LESS and PL5) , and ... it's not working ... 
      It's not the first time. Usually I had trouble with a plugin name Autoptimize , but it's Desactivate now , all memory have been purge, and it's still not working! :-/ So it's not from this plugin. 
      NB : When I am logged on my website, if i go on the black wordpress dashboard bar, go on the PL icon, clic on </> LESS/CSS => then the page suddenly apply the CSS .... But As soon that i reload the page, nothing. I think the problem is that the plugin LESS/CSS does not load properly (if I can say that with my simples words).
      I order to keep the site "good looking" I have temporally copy/paste all my LESS code in a plugin : Script n Styles that apply the LESS/CSS code... but it's not a solution for long time.
      Can someone help me ? Did I do something wrong ? Is it an update ? 
       
      my website : https://www.wedding-photography-minneapolis.com
    • Jason
      By Jason+
      Feel free to delete this post if its not helpful or its just plain wrong.
       
      I though it might be useful to share how I customize the size of the builder. (reduce my eyestrain )
      1 - install stylerbot extension in chrome (stylerbot keeps this css every time you access the url)
       
      2- add this css to stylerbot for the site you are working on
      .CodeMirror {
          font-size: 14px;
          height: 600px;
      }
      .pl-workarea.pl-has-sidebar .pl-workarea-sidebar-container {
          right: 0px;
          width: 500px;
      }
      .pl-workarea.pl-has-sidebar .iframe-container {
          right: 500px ;
      }
       
      change sizes to suit.
       
      Cheers.
×