What's new

Welcome to the forum 👋, Visitor

To access the forum content and all our services, you must register or log in to the forum. Becoming a member of the forum is completely free.

how to make image and text centered

ebeh

New member
Joined
Sep 4, 2019
Messages
2
Reaction score
0
HTML Coins
0
I want to make a table of icons with accompanying text to its right, like the following:

a (1).png

These icons are svg files that I downloaded from Font Awesome.

The code I have at the moment is

<style> td { height: 30px; vertical-align: middle; } th td { text-align: center; } </style> <section style="background-color: #f5dd9d; padding: 8px; border-radius: 10px;"> <table> <tbody> <tr> <td><img height="16px" src="icons/map-marker.svg"></td> <td style="vertical-align: middle;">35 Theron St., North Karianne</td> </tr> <tr> <td><img height="16px" src="icons/mobile.svg"></td> <td>+1-843-905-2931</td> </tr> <tr> <td><img height="16px" src="icons/envelope.svg"></td> <td>john.doe@mail.com</td> </tr> <tr> <td style="text-align: center;"><img height="16px" src="icons/link.svg"></td> <td>linkedin.com/in/john-doe</td> </tr> </tbody> </table> </section>

I want both the text and the icons to be vertically centered, as in this image (the thin black horizontal lines as a visual aid):


a (2).png

The css rules found inside the <style> element are not solving this problem.

The svg files can be found in the "icons" directory in the code pen project I created for this question.
 

Theme customization system

You can customize some areas of the forum theme from this menu.

  • Wide/Narrow view

    You can control a structure that you can use to use your theme wide or narrow.

    Grid view forum list

    You can control the layout of the forum list in a grid or ordinary listing style structure.

    Picture grid mode

    You can control the structure where you can open/close images in the grid forum list.

    Close sidebar

    You can get rid of the crowded view in the forum by closing the sidebar.

    Fixed sidebar

    You can make it more useful and easier to access by pinning the sidebar.

    Close radius

    You can use the radius at the corners of the blocks according to your taste by closing/opening it.

  • Choose the color combination that reflects your taste
    Background images
    Color gradient backgrounds
Back