Link to home
Start Free TrialLog in
Avatar of Ima Jedi
Ima JediFlag for United States of America

asked on

"Back to Top" CSS id causing other element to misalign

I created an id for my back to top link on my WordPress site.
I styled it using css with the #backtotop selector.
Now when I click on the back to top link, my top nav links all align to the left.
Any ideas or suggestions?
<p id="tothetop"> <a href="#menu-header-menu">Back to Top</a></p>

Open in new window

#tothetop {
	text-align: right !Important;
}

Open in new window

before:User generated imageafter: User generated imageUser generated image
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Have you got a link to show us?

Also your question is confusing. You mention #BackToTop but in the code it is #tothetop
Avatar of Ima Jedi

ASKER

The site is not live yet.
 You are correct it is #tothetop, please disregard #BackToTop.
ASKER CERTIFIED SOLUTION
Avatar of Ima Jedi
Ima Jedi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Found solution before anyone else helped.