UL CSS Columns - Line up columns height to match if multiple lines - html

I currently am using CSS columns, to create a 2 column layout for an unordered list. Here's the code:
HTML
<div class="meta-data">
<ul>
<li><i class="fa fa-chevron-right fa-xs"></i><strong>Case Study</strong> Case Study Here </li>
<li><i class="fa fa-chevron-right fa-xs"></i><strong>Sector</strong> Sector Here </li>
<li><i class="fa fa-chevron-right fa-xs"></i><strong>Client</strong> Client Here </li>
<li><i class="fa fa-chevron-right fa-xs"></i><strong>Value</strong> Value Here </li>
<li><i class="fa fa-chevron-right fa-xs"></i><strong>Programme Duration</strong> Programme Duration Here </li>
<li><i class="fa fa-chevron-right fa-xs"></i><strong>Current Status</strong> Current Status Here </li>
</ul>
</div>
CSS
.meta-data ul {
columns: 2;
-webkit-columns: 2;
-moz-columns: 2;
}
This works fine. However, if any of the li content wrap onto 2 lines or more, it throws off the 2nd column bullet points so they're not all lined up horizontally...
For example:
Case Studies: This goes onto Value: Value Here
two lines
Programme Duration: Duration here.
Sector: Sector here.
Current Status: Current Status here.
Client: Client Here
This looks messy.
I'd rather it showed as:
Case Studies: This goes onto Value: Value Here
two lines
Sector: Sector here. Programme Duration: Duration here.
Client: Client Here Current Status: Current Status here.
Is this easily possible with the CSS columns setup, or do I need to recode this a diff way?

I don't see a way to do this using column property, you can use css grid
.meta-data ul {
display:grid;
grid-template-columns: 300px 300px;
grid-column-gap:10px;
}
<div class="meta-data">
<ul>
<li><i class="fa fa-chevron-right fa-xs"></i><strong>Case Study</strong> Case Study Here Case Study HereCase Study</li>
<li><i class="fa fa-chevron-right fa-xs"></i><strong>Sector</strong> Sector Here </li>
<li><i class="fa fa-chevron-right fa-xs"></i><strong>Client</strong> Client Here </li>
<li><i class="fa fa-chevron-right fa-xs"></i><strong>Value</strong> Value Here </li>
<li><i class="fa fa-chevron-right fa-xs"></i><strong>Programme Duration</strong> Programme Duration Here </li>
<li><i class="fa fa-chevron-right fa-xs"></i><strong>Current Status</strong> Current Status Here </li>
</ul>
</div>

Related

How can I put href into my code in dropdown

So, I got my Dopdown for Languages, I want to make a href if I press on "English", how can I do that?
<div class="nav-wrapper">
<div class="sl-nav">
Sprache:
<ul>
<li><b>Deutsch</b> <i class="fa fa-angle-down" aria-hidden="true"></i>
<div class="triangle"></div>
<ul>
<li><i class="sl-flag flag-de"><div id="germany"></div></i> <span class="active">Deutsch</span></li>
<li><i class="sl-flag flag-usa"><div id="germany"></div></i> <span>English</span></li>
<li><i class="sl-flag flag-cz"><div id="germany"></div></i> <span>Česky</span></li>
</ul>
</li>
</ul>
</div>
</div>
Im pretty new, to HTML and don't know where to put my href
You could put the a anchor in the whole li element, so it works by clicking on the text and also the flag:
<li><i class="sl-flag flag-usa"><div id="germany"></div></i> <span>English</span></li>
also, remember to change your ids, they're all germany now
You can add an anchor tag <a> on the elements:
<li><i class="sl-flag flag-usa"><div id="germany"></div></i>English</li>

How do I get mwc-icon-button working with font awesome?

I have the following...
<!-- Works -->
<i class="fab fa-linkedin" slot="actionItems"></i>
<!-- Does not work -->
<mwc-icon-button icon="linkedin" slot="actionItems"></mwc-icon-button>
Also tried variations like...
<mwc-icon-button icon="fa-linkedin" slot="actionItems"></mwc-icon-button>
<mwc-icon-button class="fab fa-linkedin" icon="linkedin" slot="actionItems"></mwc-icon-button>
But can't get it so what is the deal?

Rotate arrow when hovered over menu link

I'm trying to rotate an arrow 90 degrees when I hover over a menu item on my navbar.
The navbar menu when hovered over currently displays a list of sub menus, but I'd like for the arrow to rotate facing down when the submenu is displayed. Submenu hover works as I'd like to right now, but I can only get the arrow to rotate if I hover directly over it. I would like tie the arrow rotation and the submenu display together.
Here's my HTML:
<li>
<a>
<i class="fa fa-columns" aria-hidden="true"></i>
Admin
<i class="fa fa-arrow-right" aria-hidden="true"></i>
</a>
<ul>
<li><i class="fa fa-globe" aria-hidden="true"></i> Source Admin</li>
<li><i class="fa fa-inbox" aria-hidden="true"></i> Service Admin</li>
<li><i class="fa fa-clipboard" aria-hidden="true"></i> Bulk Services</li>
</ul>
</li>
Here is my CSS:
nav li:hover > ul
{
display: block;
}
nav i:hover
{
transform: rotate(90deg);
}
I should also note, that the way I have it right now rotates every other menu icon at the moment.
Any help is appreciated, thank you!

Font awesome stacking square and square-o don't align

I'm trying to make this using font-awesome stacking
I've tried two ways, but both are ugly. The problem is that fa-square and fa-square-o are different sizes, so when you stack them, they don't line up!
my fiddle
<span class="fa fa-stack">
<i class="fa fa-square fa-stack-1x"></i>
<i class="fa fa-plus-square fa-stack-1x fa-inverse"></i>
<i class="fa fa-square-o fa-stack-1x"></i>
</span>
<span class="fa fa-stack">
<i class="fa fa-square fa-stack-1x fa-inverse"></i>
<i class="fa fa-plus-square-o fa-stack-1x"></i>
</span>
The result is
I have tried to scale down the fa-square by 86% using css. However, that is very fragile, because it depends on the browser and the zoom setting. I would like the solution to look good on both Chrome and IE11 at multiple zoom levels.
This might help.
body {
background-color: tan;
font-size: 100px;
}
.fix:before {
background: #000;
border-radius: 20%;
padding: 1% 5%;
}
.fix-2:before {
background: #000;
border-radius: 20%;
padding: 1% 10%;
}
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"/>
<span class="fa fa-stack">
<i class="fa fa-square fa-stack-1x fix"></i>
<i class="fa fa-plus-square fa-stack-1x fa-inverse"></i>
</span>
<!-- Without Stacking -->
<i class="fa fa-plus-square fa-inverse fix-2"></i>
Unfortunately, if you want to use the icons of Font-Awesome, you will have to contribute to the project by making a new generation of fa-square and all the derivatives (rss-square, ...) to standardize the size of the icons.
Developers no longer accept pull-request for icons so it may take a long time before it is accepted. (As Hugues M. said, it's a known bug)
The workarounds I see:
Create your own icon based on a font (see this post), override the square unicode (f0c8) or get an other free one. (and push your solution in github). It is generic, you can dynamically change the color but it take a long time.
Or simply make an image (SVG or something else) for your project, it's quick but less malleable.

Magically, you can not view the image

I have maybe simple problem but I really don't know what's wrong :(
http://airbyt.cz/byty Images in the divs are not loaded in all browsers except google chrome and chrome mobile. It doesn't log error in the path.
there is code.
<main>
<div class="object-byt"><h1>Modern apartment close to center with jacuzzi</h1><div class="for-img"><div class="zakryj"></div><span><i class="fa fa-2x fa-home" aria-hidden="true"></i></span><img src="img/ap-1.jpg" alt="interior"></div></div>
<div class="object-byt"><h1 class="broken">Cozy apartment in Prague</h1><div class="for-img"><div class="zakryj"></div><span><i class="fa fa-2x fa-home" aria-hidden="true"></i></span><img src="img/ap-2.jpg" alt="interior"></div></div>
<div class="object-byt"><h1>Super luxury apartment in center of Prague</h1><div class="for-img"><div class="zakryj"></div><span><i class="fa fa-2x fa-home" aria-hidden="true"></i></span><img src="img/ap-3.jpg" alt="interior"></div></div>
<div class="object-byt"><h1>Great apartment in center of Prague</h1><div class="for-img"><div class="zakryj"></div><span><i class="fa fa-2x fa-home" aria-hidden="true"></i></span><img src="img/ap-4.jpg" alt="interior"></div></div>
<div class="object-byt"><h1 class="broken">Cozy apartment in heart of Prague</h1><div class="for-img"><div class="zakryj"></div><span><i class="fa fa-2x fa-home" aria-hidden="true"></i></span><img src="img/ap-5.jpg" alt="interior"></div></div>
</main>
I will be glad for every advice. Thank you
Your image is in webp format which is only read by Chrome. You need to convert it to a regular image file. I tried http://image.online-convert.com/convert-to-jpg on one of your images and it worked. I'm sure there are many other solutions as well.