Posted in site bugs
337
2:36 am, January 1, 2021
 

top bar overflow issues [fixed]

<p>So i was just browsing throught the site checking for random errors, which there are quite a lot. And noticed this one.</p>
<p><img src="https://i.imgur.com/uQXG2Ug.png" /></p>
<p>Quite a large bug caused by overflow issues in the main header, i think this can be resolved by changing the header to be a fixed height and scroll, or make it a dropdown toggle.</p>
<p>Not sure what is the most useful here.&nbsp;</p>
<h3>Bug Status: <strong><br /></strong></h3>
<p>Pending</p>
<h3><strong>Demo Link</strong></h3>
<p><a href="https://www.kruxor.com/view/nzpostcodes/lujBt/wray-street-brockville-dunedin/">https://www.kruxor.com/view/nzpostcodes/lujBt/wray-street-brockville-dunedin/</a>&nbsp;</p>
<h3>Solution</h3>
<p>Set a max height to one row on the top bar, and then add a toggle button that can show all the content if activated.</p>
<p><a href="https://www.kruxor.com/view/code/Zj3OV/transitions-and-the-easy-way-to-apply-them/">Add a transition to the element</a>, as it will be moving when the toggle is clicked.</p>
<p>Then the toggle button will need to change the <code>max-height:30px</code> to <code>max-height: fit-content</code> which will probably need to be done with javascript. <a href="https://www.kruxor.com/view/code/akyNb/">set max height js</a></p>

HTML

<!-- Add a Toggle Button to the Nav -->
<a href="#!" id="second_nav_toggle" onclick="second_nav_toggle();" class="second_nav_toggle"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">
  <path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/>
</svg></a>

CSS

/* Set a max height on this element and then hide all the content */
.nav-scroller {
    max-height:30px;
    overflow-x:hidden;
    overflow-y:hidden;
    transition: all 0.3s;
}

/* Design the Secondary Nav Toggle Button */
.second_nav_toggle {
  padding:3px 3px 0px 3px;
  border:1px solid;
  border-radius: 3px;
  height:23px;
  width:24px;
  text-align: center;
  display:inline-block;
  margin-top: 3px;
}
.light-mode .second_nav_toggle {
    color: #656565;
    border-color: #c9c9ca;
}
.light-mode .second_nav_toggle:hover {
    background: var(--light-mode-2);
}
.dark-mode .second_nav_toggle:hover {
  background:#2e3c50;
}
.dark-mode .second_nav_toggle {
    border-color: #2e3c50;
}

Javascript

function second_nav_toggle() {
		document.getElementsByClassName( "nav-scroller" )[0].style.maxHeight = "none";
	}

<!-- Add a Toggle Button to the Nav -->
<a href="#!" id="secondnavtoggle" onclick="secondnavtoggle();" class="secondnavtoggle"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/>
</svg></a>

View Statistics
This Week
306
This Month
1345
This Year
462

No Items Found.

Add Comment
Type in a Nick Name here
 
Related Search Terms
Search Code
Search Code by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

You could also follow me on twitter. I have a couple of youtube channels if you want to see some video related content. RuneScape 3, Minecraft and also a coding channel here Web Dev.

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote
In this case my anchor this week becomes driving almost 2hrs outside of Atlanta to one of my favorite hard core gyms in the world.. MetroFlex aka The Dungeon. The gym owners turn the heat way up so it becomes a fun sweat box and the gym members just watch from afar and leave me alone. I happily drive myself long distances to find MY ANCHOR. Our anchor allows us to have balance, focus and be as productive as possible. And if you're in the middle of a heavy set and your headphones start to fall off your head, like mine did here.. well.. f*ck the headphones. Let em break and fall. You can always get a new pair, but the iron ain't ever gonna lift itself.
Unknown
Latest News
## 🚀 AI Giants Hit Bullseye: Anthropic & OpenAI Achieve Product-Market Fit Anthropic and OpenAI have reached a significant milestone, finding product-market fit with their AI technologies, which means their products effectively meet the needs of their customers, driving growth and adoption. This achievement showcases the practical value of their innovations, enabling businesses and individuals to leverage AI for enhanced productivity and efficiency. With this alignment of product and market needs, these companies are poised to transform industries and shape the future of technology.