making the size of all the buttons same when using @html.Actionlink

I have the following four buttons on my web page. One of the button is @Html.ActionLink, the shape of this button is thicker than other buttons. I tried to use the same class for @Html.ActionLink as for other buttons. below is the screen shot of the buttons: below is the code and style sheet for… Read More making the size of all the buttons same when using @html.Actionlink

How to get 2 images inside flexbox items to full screen width

I cannot get both images to be the same width with a relative position. Both images are placed inside a flexbox container, and then placed in another div, item 1 and item 2 respectively. This is my HTML code: <!– parliament background –> <div class="container"> <div class="item1"> <img class="img3" src="pictures/1920px-Parliament_of_Hungary_November_2017.jpg" alt="" style="width: 100%" /> </div>… Read More How to get 2 images inside flexbox items to full screen width

How do I limit height of some divs to other divs in the same parent div with display flex row?

I have a parent div with display:flex; flex-direction: row; flex-wrap: wrap; Inside it there are child divs, lets call them a b c d Each div has <ul></ul> with multiple items inside it. So it’s something like this: <style> .flex-container { display: flex; flex-direction: row; } .list-container { padding: 10px; border: 1px solid black; }… Read More How do I limit height of some divs to other divs in the same parent div with display flex row?

Make flex item grow to available space, but keep aspect ratio

Is it possible to make flex items grow to the available space, but keep the aspect ratio? Here, I am having perfect squares, and I want to keep them as perfekt squares, but also make them grow to the vailable space that there is. .container { display: flex; flex-direction: row; justify-content: space-evenly; align-content: center; width:… Read More Make flex item grow to available space, but keep aspect ratio

How can I pull my last flex box child to the right?

I’ve got a navbar, and I want to space the links evenly across the bar. This is my HTML <nav class="mainAddressBar"> <ul class=’navLinks’> <li class="navItem"><a href="index.html">Home</a></li> <li class="navItem"><a href="about.html">About Us</a></li> <!–<li class="navItem"><a href="portfolio.html">Portfolio</a></li>–> <li class="navItem"><a href="contact.html">Contact</a></li> </ul> </nav> CSS: .navLinks { display: flex; justify-content: space-between; /*padding-left: 10em;*/ } .navItem { flex: 1; } .navItem:last-child{ margin-left:… Read More How can I pull my last flex box child to the right?

Why does "style.height/width" doesn't work with variables, only set values?

Currently trying to display a 16×16 grid using Flexbox and some DOM manipulation. This is the code that I would like to create a 16 block row inside the grid container: // Gets grid’s dimensions const gridContainer = document.getElementById(“grid-container”); const gridHeight = gridContainer.offsetHeight; const gridWidth = gridContainer.offsetWidth; function createBlock() { const gridBlock = document.createElement(“div”); gridBlock.style.height… Read More Why does "style.height/width" doesn't work with variables, only set values?

How to center image

I’d like to use flexbox to center the image. Can I do this without putting the picture in another div? I think I tried all flexbox options but not sure, that’s why I’m asking. Here’s some HTML and CSS code. body { font-family: sans-serif; font-size: 10vw; display: flex; flex-direction: column; background-color: grey; word-wrap: break-word; }… Read More How to center image