skip to Main Content

I want to display a logo and right next to the logo, I want to display the name of the parent company and then the name of my company right underneath the parent company in a HTML page. when I browse the HTML page, I see the name of the parent company, but I don’t see the name of my company. I have the following code:

 <body>
        <div>
                  <span style="display:flex;">
                <a href="https://www.apple.com/">
                    <img src="Images/apple.png" alt="RCA" width="80" height="80" class="d-inline-block align-middle mr-2" runat="server" />
    
                </a>
                <span style="font-size:25px;color:white;"><span style="color:#e9c46a">This is parent Company</span><br />This is my company name</span>
    
            </span>
    </div>
    </body>

I dont see "This is my company name" right underneath the parent company. I want both "This is parent Company" and "This is my company name" aligned in the middle right underneath each other. Right now, when I run the code, I see this:

enter image description here

I want something like this:

logo This is parent Company
     This is my company name

any help will be appreciated.

2

Answers


  1. This is one way to do it:

    <html>
    <head>
        <title>Test</title>
        <style>
            .container {
                display: flex;
                align-items: center;
                padding: 10px;
            }
            
            .logo {
                width: 100px;
                height: 100px;
                margin-right: 20px;
            }
            
            .names {
                display: flex;
                flex-direction: column;
            }
            
            .name {
                font-size: 24px;
                margin-bottom: 10px;
            }
        </style>
    </head>
    <body>
        <div class="container">
            <div class="logo">
                <img src="https://via.placeholder.com/100" alt="Logo">
            </div>
            <div class="names">
                <div class="name">Parent Company</div>
                <div class="name">My Company</div>
            </div>
        </div>
    </body>
    </html>

    Just add your logo and make any necessary adjustments.

    Login or Signup to reply.
  2. maybe this help you:

    .test{
            padding-left: 110px;
            }
    .test1{
          display:flex;
          align-items: center;
          text-align:left;
        }
    .test2{
          padding-left: 10px;
        }
    <html>
    <head>
    </head>
    <body>
    <div >
        <div class="test1">
        <a href="https://www.apple.com/">
        <img width="100px" height="100px" src="https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png"/></a>
        <span class="test2"> This is parent Company</span> 
        </div>
        <div class="test">
        <span>This is my company name</span>
        </div>
    </div>
    </body>
    </html>
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search