I am trying to create a div that is square on the top site and flows into a triangle,
the square part is not so complex and works fine, but the triangle part is a little more complicated. The box should vary in size with the size of the screen, in the square I did this using% in width and height, but I can not use the% sign in the border property
The code that I have at this moment
HTML
<div id="overV12" class="menuItem" onclick="scrollToT('#overons')" onmouseover="setHover('overV12')" onmouseout="setOldClass('overV12')"><div class="menuInner">Over V12</div></div>
CSS
div.menuItem { height: 5.38%; width: 7.44%; position: fixed; background-color: rgb(239, 239, 239); cursor: pointer; z-index: 12; text-align: center; top: 4.3%; } div.menuItemHover { height: 5.38%; width: 7.44%; position: fixed; cursor: pointer; z-index: 12; text-align: center; top: 4.3%; background-color: rgb(211, 211, 211); } div.menuItemActive { height: 7.8%; width: 7.44%; position: fixed; cursor: pointer; z-index: 12; text-align: center; top: 4.3%; background-color: Black; color: White; }
JavaScript is used to set the class: I did this because I used the parralax library and wanted to set the "active" button at a certain height
Hope someone can help me (and maybe others) with this problem
jsfiddle example My idea is that when a div is set to class menuItemActive, it will have an arrow, otherwise it only happens when it is set to active
source share