Centering Image and Icon in Semantic-UI card
How do I make an centering image and icon in semantic-ui card?
Centering Image in Semantic-UI card. What is a centering image and icon in semantic-ui card? How do you make a centering image and icon in semantic-ui card? This script and codes were developed by Dzulfikar Adi Putra on 06 September 2022, Tuesday.
Centering Image and Icon in Semantic-UI card - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Centering Image and Icon in Semantic-UI card</title> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.1.8/semantic.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h2 class="ui dividing header">Centering Image in Semantic-UI card</h2>
Reference :
<ul> <li>Horizontal alignment of image<a href="http://jsfiddle.net/marvo/3k3CC/2/">http://jsfiddle.net/marvo/3k3CC/2/</a></li> <li>Vertical alignment of image<a href="http://stackoverflow.com/questions/7273338/how-to-vertically-align-an-image-inside-div">http://stackoverflow.com/questions/7273338/how-to-vertically-align-an-image-inside-div</a></li> <li>Vertical alignment of text<a href="http://stackoverflow.com/questions/8865458/how-to-vertically-center-text-with-css">http://stackoverflow.com/questions/8865458/how-to-vertically-center-text-with-css</a></li>
</ul>
<div class="ui cards"> <div class="ui card"> <div class="image rectangle"> <img src="http://sallyaroundthebay.com/wp-content/uploads/2013/06/duck-Ernst-Vikne-300x300.jpg"> </div> <div class="content"> <a class="header">Rectangle Image</a> <div class="meta"> <span class="date">Joined in 2013</span> </div> <div class="description"> Kristy is an art director living in New York. </div> </div> </div> <div class="ui card"> <div class="image portrait"> <img src="http://www.mossyoak.com/images/blogs---waterfowl/duckacc_ll.jpg"> </div> <div class="content"> <a class="header">Portrait Image</a> <div class="meta"> <span class="date">Joined in 2013</span> </div> <div class="description"> Kristy is an art director living in New York. </div> </div> </div> <div class="ui card"> <div class="image landscape"> <img src="http://www.fws.gov/refuges/news/images/FalcatedDuck1.jpg"> </div> <div class="content"> <a class="header">Landsacpe Image</a> <div class="meta"> <span class="date">Joined in 2013</span> </div> <div class="description"> Kristy is an art director living in New York. </div> </div> </div> <div class="ui card"> <div class="image icon"> <i class="teal huge icon settings"></i> </div> <div class="content"> <a class="header">Icon</a> <div class="meta"> <span class="date">Joined in 2013</span> </div> <div class="description"> Kristy is an art director living in New York. </div> </div> </div>
</div>
</body>
</html>
Centering Image and Icon in Semantic-UI card - Script Codes CSS Codes
body { padding: 40px;
}
.card { width: 200px !important;
}
.card .image { background: black !important; width: 200px; height: 200px;
}
.card .image.icon { text-align: center; line-height: 200px;
}
.card .image.icon i { display: inline-block; vertical-align: middle;
}
.card .image.portrait img { border-radius: 0 !important; height: 200px !important; width: auto !important; margin: auto;
}
.card .image.landscape img { border-radius: 0 !important; position: absolute; top: 0; bottom: 0; margin: auto;
}
Developer | Dzulfikar Adi Putra |
Username | superpikar |
Uploaded | September 06, 2022 |
Rating | 3 |
Size | 2,546 Kb |
Views | 70,840 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Image Map | 4,096 Kb |
Force Layout JSON Directed Graph using Dot Engine 2, nodes using array of object | 3,127 Kb |
Ionic - Wordpress REST API starter | 2,961 Kb |
Vue v1 Search and Pagination | 4,859 Kb |
JS Tree Example JSON Data | 2,435 Kb |
Force Layout Directed Graph using dot engine dagre-d3js library, data from JSON | 6,536 Kb |
Ionic Alphabetical List | 3,136 Kb |
Bulma breadcrumbs | 1,895 Kb |
D3JS Simple JSON SVG barchart vertical | 2,234 Kb |
Multiple Expand Collapse | 2,733 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Sticky div | Kaslab | 2,225 Kb |
Highbrow Basic HTML Lesson 8 | Kimlarocca | 2,094 Kb |
Canvas snow | Win7killer | 2,572 Kb |
Console fun | Dviate | 1,500 Kb |
Spiralator 9000 | AdmiralPotato | 4,671 Kb |
Navcube | Wbarlow | 4,775 Kb |
A Pen by Oliver Schafeld | Schafeld | 1,720 Kb |
Flip test | Madhes | 1,635 Kb |
CSS Infinite 360 | APinix | 5,564 Kb |
Background-blend-mode Test | 0x04 | 4,744 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!