View Single Post
Old 08-26-2025, 12:42 PM   #15
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,834
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by ElMiko View Post
Ah, but now we're back to the original issue. This is basically the same code structure as what I initially posted, and the issue is that the float causes the text to break.
Well, try this then:

Code:
.bigWrapper {
  text-align: center;
}

.wrapper {
  display: inline-block;
}

.col1 {
  display: inline;
  text-align: left;
}

.col1 img {
  display: block;
  float: left;
  width: 2.5em;
  height: 2.5em;
  margin: 0 5px 0 0;
}

.ib {
  display: inline-block;
}

Code:
  <div class="bigWrapper">
    <div class="wrapper">
      <p class="col1"><img alt="" src="../Images/diamant.png"/><span class="ib">LOREM<br/>IPSUM DOLOR SIT AMET, CONSEC</span></p>
    </div>
  </div>
Here you have the output:

Click image for larger version

Name:	One1.jpg
Views:	15
Size:	48.0 KB
ID:	217734

Centered block, text aligned to left, no breaks.

Last edited by RbnJrg; 08-26-2025 at 12:45 PM.
RbnJrg is offline   Reply With Quote