Solved

Using css to move a class to the left of its current position

Posted on 2013-06-05
4
293 Views
Last Modified: 2013-06-05
Hi

I'm trying to move a menu to the left, and I think what I am missing in my css are the proper positioning/addition of the "Class" dots ".".

Here's a shortened URL to the site:

Link to page with menu

The menu is on the upper right and is controlled by the following in the html:

<ul class menu nav-pills _topMainRowbyMenu hidden-phone">

Open in new window


Here's the css I have so far, and it is not affecting anything at all:

ul.menu nav-pills _topMainRowbyMenu hidden-phone {
margin-left: -100px;
}

Open in new window


What mods do I have to make to the above to get it to work -- that is, move the top right menu a bit to the left.

Thanks

Rowby
0
Comment
Question by:Rowby Goren
  • 3
4 Comments
 
LVL 55

Expert Comment

by:Julian Hansen
ID: 39222643
Change this on line 203 of rt_leviathan-custom.css
ul.menu.nav-pills._topMainRowbyMenu {
  margin-left: 100px;
}

Open in new window

0
 
LVL 55

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 39222658
The reason your code does not work is you left out the .'s this should also work

ul.menu nav-pills._topMainRowbyMenu.hidden-phone {
margin-left: -100px;
}

Although you might find using a negative margin moves the box 300px to the left of where it is now - because a margin is already defined on the style in my earlier post.

Unless there is a reason not to change this style then my earlier post is the correct solution.
0
 
LVL 9

Author Closing Comment

by:Rowby Goren
ID: 39222695
Thanks, Julian.

I  went ahead and did the negative position.

Rowby
0
 
LVL 55

Expert Comment

by:Julian Hansen
ID: 39222755
You are welcome - thanks for the points.
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Width of Page is Affecting Side Menu 6 31
Box Locations 6 21
dashicon not showing on one website 13 28
removing a class in javascript 4 50
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question