troubleshooting Question

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

Avatar of Ima Jedi
Ima JediFlag for United States of America asked on
CSSWordPressHTMLWeb Languages and Standards
4 Comments1 Solution77 ViewsLast Modified:
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>
#tothetop {
	text-align: right !Important;
before:Top navigation before I click on the back top top link.after: URL AFTER I click on the back top top link.Top navigation AFTER I click on the back top top link.
Ima Jedi

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros