Site logo

Archived topic

Navigation background width

8 replies · Started by Suganthan on August 18, 2018

Viewing posts 1–9 of 9

Thanks. Nothing works.

.main-navigation ul ul {
	display: block;
	box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
	float: left;
	position: absolute;
	left: -99999px;
	opacity: 0;
	z-index: 99999;
	width:250px;
	text-align:left;
	top: auto;
	transition: opacity 80ms linear;
	transition-delay: 0s;
	pointer-events: none;
	height: 0;
	overflow: hidden;
}

I tried to add width as 250px

Tried this as well. No joy.

width: auto;
white-space: nowrap;

The second block of the CSS in the article above should work:

.main-navigation ul ul {
    width: auto;
    white-space: nowrap;
}

I tested it using browser inspect:
https://www.screencast.com/t/7RROqwydWHY

However I'm not seeing the CSS being added. Please re-add it again and clear your caching plugin.

Thanks Leo.

I have added the code to style.css

Cleared WP rocket

Purged CDN

Not working :(

What is the CSS file you added this code to?

I just used browser inspect.

Are you adding it to the theme's style.css or child theme's style.css?

Make sure you are not modifying the theme's style.css as it will be erased during update.

Try one of these methods here: https://docs.generatepress.com/article/adding-css/

I put the class into Additional CSS in customize and it worked.

Thanks for your help.

No problem :)

This archived topic is closed to new replies.