Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Make menu float to the right [wordpress]

Featured Replies

I need to make just the 'Login' page float to the right like the picture below

 

76685_page.png

 

 

 

On my menu editing page there's an option for 'Title attribute', is there a code i could add here to make just this individual login page float to the right?

 

58167_page2.png

 

Also I'm also using Sahifa theme if that makes a difference.

I need to make just the 'Login' page float to the right like the picture below

 

76685_page.png

 

 

 

On my menu editing page there's an option for 'Title attribute', is there a code i could add here to make just this individual login page float to the right?

 

58167_page2.png

 

Also I'm also using Sahifa theme if that makes a difference.

Enter 'login' in the title attribute.

 

Then in your css do this:

 

li a[title=login] {
   float: right;
}

Make sure the container is also cleared as it will cause display problems that will have you scratching your head for hours :)

 

Let me know if you need help, also provide a link if you can

Edited by Samus

  • Author

u mean u want the login link to float to the right?

yes

 

 

Enter 'login' in the title attribute.

 

Then in your css do this:

 

li a[title=login] {

float: right;

}

Make sure the container is also cleared as it will cause display problems that will have you scratching your head for hours :)

 

Let me know if you need help, also provide a link if you can

 

Is it the 'style.css' file in my theme folder that i need to edit?

 

When i opened that file to edit it there were loads of codes that I don't understand, so I don't know where I would need to copy and paste the code you mentioned.

 

I can only just vaguely read and understand some of it and I'm guessing it would go somewhere under the section called /* Top Menu Styles */, could you please show me where in the picture I would need to paste the code?

http://www.pictureshack.us/images/90050_link.png

(might also be this) http://www.pictureshack.us/images/25749_link2.png

Also I didn't quite get what you said about making sure the container is cleared :/ (I'll just make sure I back up before making any changes)

 

Edited by MartinHadAdream

 

yes

 

 

 

Is it the 'style.css' file in my theme folder that i need to edit?

 

When i opened that file to edit it there were loads of codes that I don't understand, so I don't know where I would need to copy and paste the code you mentioned.

 

I can only just vaguely read and understand some of it and I'm guessing it would go somewhere under the section called /* Top Menu Styles */, could you please show me where in the picture I would need to paste the code?

http://www.pictureshack.us/images/90050_link.png

(might also be this) http://www.pictureshack.us/images/25749_link2.png

Also I didn't quite get what you said about making sure the container is cleared :/ (I'll just make sure I back up before making any changes)

 

Yeah the style.css

 

And pasting it anywhere is fine really, i'd just make a comment at the bottom with something like 'custom styles' and place the code right at the bottom.

 

As said do you have a link to the site you're working on?

 

EDIT: Actually the code I posted above won't work as I thought it would.

 

Drop me a working link and i'll reply with a better working code

Edited by Samus

  • Author

Yeah the style.css

 

And pasting it anywhere is fine really, i'd just make a comment at the bottom with something like 'custom styles' and place the code right at the bottom.

 

As said do you have a link to the site you're working on?

 

EDIT: Actually the code I posted above won't work as I thought it would.

 

Drop me a working link and i'll reply with a better working code

Here's the website http://goo.gl/Elpl9n

Here's something you could try.

 

Right clicking the Login link and choosing Chrome's Inspect Element or Firebug you can see that particular element has an id with the name menu-item-1079

 

wp-wdf-screen-1.png

 

Now, login to your WordPress dashboard and on the left-hand side choose Appearance > Editor

 

wp-wdf-screen-2.png

 

 

This opens up a style.css file. This is different from accessing the file on the server via an ftp program. Although this method feels a bit clunkier it's the easiest way to add small style tweaks to your blog. This is a screenshot from one of my blogs that I use to practice, it's a bit of a hodge-podge but it does the trick!

 

 

wp-wdf-screen-3.png

 

I always add any extra styles to the bottom so that I know where I've put them in future. Scroll to the bottom and add the appropriate style to make your link float to the right, remembering that you're styling

 

li#menu-item-1079
 

 

or

 

li#menu-item-1079 a
 

 

I'd try either floating it to the right as you've suggested or just increasing the left-margin or left-padding on the li#menu-item-1079 or the li#menu-item-1079 a tag.

 

You could also try increasing the right-margin or right-padding on the Forum link to nudge the Login/Register button along or use #main-nav ul li:last-child a to just select the last a tag in the list.

 

Hope that was reasonably understandable, have fun!!

Edited by JustOliver

  • Author

@Just Oliver

 

Thanks but I've tried adding this and a couple other variations at the bottom of the page but it's still not working :/

 

 

li#menu-item-1079 {

margin-right : 20;

}

 

 

I don't understand them at all, could you please help me type one that I can just copy and paste anywhere on the css file

Edited by MartinHadAdream

 

li#menu-item-1079 {

margin-right : 20;

}

 

@JustOliver's code should work, you only need to specify px or ems, like this:

 

li#menu-item-1079 {
      margin-right: 20em;
}

I just checked in Inspect Element and it worked :)

Hope that helps.

  • Author

@JustOliver's code should work, you only need to specify px or ems, like this:

 

li#menu-item-1079 {
      margin-right: 20em;
}

I just checked in Inspect Element and it worked :)

Hope that helps.

How?

 

Is there anywhere specific I need to paste it into, it's currently at the bottom of the page and I've updated the file but it's not made any changes

 

 

 

58565_css.png

 

 

Margin-left; actually, you need the left margin, not the right, didn't realise I have put right instead of left.

Just replace the margin-right; with margin-left;

 

You need to paste this in your style.css file, as above.

It should work then :)

  • Author

 

li#menu-item-722 {
color: #f88c00;
}

 

Can someone please correct the code above, In the menu I'm trying to change the font colour of 'forum' individually from white to #f88c00

Edited by MartinHadAdream

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.