Struggling to align text alongside a left-floating image within a dialog box

I have a question as a beginner. I'm struggling to place text on the right side of an float: left <img> element within an md-dialog:

<md-dialog aria-label="download" flex="60" ng-controller="viewerController">
    <md-toolbar>
        <div class="md-toolbar-tools">
            <h2>{{appName}}</h2>
            <span flex></span>
            <md-button class="md-icon-button" ng-click="answer('not applicable')">
                <md-icon md-svg-src="style/images/icons/ic_close_24px.svg"
                         aria-label="Close dialog"></md-icon>
            </md-button>
        </div>
    </md-toolbar>
    <md-dialog-content>
        <div id="application">
            <md-list>
                <md-list-item>
                    <div style="font-size: 16px;">
                        <img style="float: left;margin: 0 5px 0 0; padding-bottom: 12px;"
                                 ng-src="data:image/png;base64,{{appScreenshotBase64}}" 
                                 width="{{currentWidth * 0.35}}"/>
                        <h4><span class="fieldName">Technology : </span>{{appTechnology}}</h4>
                        <h4><span class="fieldName">Level : </span>{{appLevel}}</h4>
                        <h4><span class="fieldName">Development type</span> : </span>{{appDevType}}</h4>
                    </div>
                </md-list-item>
                <md-divider ></md-divider>

                <md-list-item class="md-1-line">
                    <div class="md-list-item-text">
                        <h4><span class="fieldName">Development type : </span>{{appDevType}}</h4>
                    </div>
                </md-list-item>
                <md-divider ></md-divider>
 <!-- ... -->

The width of my md-dialog is set to 60% of the current width and the <img> to 35%. There is enough space remaining (25%) inside the dialog to display data like Technology, Level, and Development type.

However, the text goes onto a new line under the <img> as shown in this image: https://i.sstatic.net/FNlfi.png

What adjustments do I need to make for it to work correctly?

Answer №1

Typically, it is recommended to utilize the layout attribute for achieving this goal. To ensure that child elements are aligned alongside each other, include layout="row" within the container.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Using TypeScript variables within an SCSS file in Vue3 seems to be a challenging task

I'm currently working on a component that has the following template structure: <template> ... <ul class="circle-container"> <li v-for="img in images" :key="img"> <img :src="i ...

The drop-down button unexpectedly disappears when using Bootstrap in combination with jQuery autocomplete

I have some javascript code that is structured like: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>jQuery UI Autocompl ...

Solving the Django Dilemma: Fixing the "No Reverse Match" Issue

My goal is to create a user-friendly experience where users can click on a product, go to the product page, and add a review directly to that page. The reviews will be displayed as users submit them. I'm not entirely convinced that this is the most ef ...

Choose the option to eliminate the dropdown arrow in all web browsers

Although my code functions well in various browsers, I am experiencing an issue with IE. I have styled the select element, but I am unable to remove the default arrow in IE. <form> <label for="selectitem">Food Favorites</label> <selec ...

Unexpected behavior in AJAX call

I'm currently working on implementing an AJAX call to display a partial view once a radio button is selected. Despite following the recommendations found on Stack Overflow comments, I am encountering difficulties. Upon selecting the radio button, ther ...

Watch for event triggered after completion of input field with ng-modal

One of my challenges involves implementing a text input field that prompts users to enter their name: <input type="text" ng-modal="form.name" placeholder="Enter NAME"> I've also set up a watch function to monitor changes in the form's nam ...

How do I determine whether an object is a Map Iterator using JavaScript?

I'm working on some NodeJS code that involves a Map Iterator object. How can I accurately determine if a Javascript object is a "Map Iterator"? Here are the methods I have attempted: typeof myMap.keys() returns 'Object' typeof myMap.keys() ...

Node.js offers a variety of routing options and URL endpoints

app.use('/api', require('./api')); app.use('/', require('./cms')); The initial path is designated for my public API, while the latter is intended for the CMS dashboard. However, the setup is flawed as localhost:80/a ...

Is there a way for me to initiate another joyride adventure?

Encountering a challenge with my joyride tour - after completing one tour, I aim to commence a second. Despite attempting to trigger the second tour in the postRideCallback function, I find myself stuck in a loop with the first tour. Seeking guidance on re ...

CSS Trick: How to Clear Content in a 3-Column Div arrangement

I've been struggling to clear the content below my three div columns, each consisting of a span with centered text and a textarea. It seems that the issue arises from the floating div tags without proper clearing. When viewed in Firefox, the next ele ...

What steps can I take to ensure the browser only shows the page once it has completely loaded?

I find it frustrating when webpages load slowly and you can see the process happening. In my opinion, it would be more satisfying to wait until everything is fully loaded - scripts, images, and all - before displaying the page. This brings up two questio ...

Infinite loop triggered by jQuery dropdown menu on page resize was causing an issue

I have been working on developing a navigation menu for a website that displays as a horizontal bar on larger screens, but transforms into a jQuery dropdown menu when the window width is less than 980px. During initial page load with a window width below ...

Is it possible to assign numerical values to attributes in HTML code?

I'm unsure about something - is it possible to set an attribute value as a number? For example: <div data-check="1"></div> Is this the correct way to do it or not? I've heard conflicting opinions, with some people saying you shouldn ...

Dynamic presentation created with Serif software

As a newcomer to web coding and one of the older generation, I recently created a basic .swf slideshow using Serif's graphic software. However, I realized that it does not display on an Apple iPad. You can experience this issue quickly here. My questi ...

Guide on creating Jasmine tests for $resource in AngularJS

Trying to get started with defining tests for my angular app, but feeling a bit lost as it's my first time working with testing. I'm specifically interested in setting up Tests with Jasmine for REST Services within my application. My main questi ...

RectJs | Extract a parameter value from the url while disregarding any null values

Seeking assistance to retrieve the value of the "fruit" parameter from the URL in reactJs. Consider the following URL structure: http://localhost:3001/buy?fruit=&fruit=1&fruit=&fruit= Any of the four "fruit" parameters may contain a value, wi ...

Customize your dropdown menu options with JQuery: A step-by-step guide

I am dealing with a situation where I have a dropdown menu labeled as Code. The options available in this dropdown are fetched from a database, populating the dropdown accordingly. Alongside the Code dropdown, there is a textbox named Name. Under certain c ...

Convert a string to HTML using AngularJs

Snippet: <tr ng-repeat="x in orderCsList"> <td class="ctn"><input type="checkbox" ng-model="x.checked"></td> <td class="ctn">{{ x.wdate }}</td> <td class="text-left">{{ x.wid }}</td> <td class="te ...

What exactly does the combination of {on, attrs} create within Vue/Vuetify?

Although this question may have been asked before, I am still struggling to grasp its meaning. Can you help me understand it better? <v-dialog v-model="dialog" width="500" > <template v-slot:activator=&quo ...

Updating input from a dynamic select element can be done by listening for changes on

Currently, I am utilizing a ng-repeat connected to a collection called vm.stations. Whenever a button is clicked, it inserts an item into the collection. User Interface <div class="row" data-ng-repeat="station in vm.stations"> <select ng-opt ...