Struggling to keep text aligned to the left?

Check out the image at https://i.sstatic.net/Qu7hT.png in my jsfiddle. It remains fixed in its position regardless of the screen width.

However, the adjacent text does not behave in the same way.

I aim to have the text positioned DIRECTLY next to the https://i.sstatic.net/uyMto.png icon without any movement even if the container is resized due to changing window width resulting in some text being hidden.

JSFIDDLE

@charset "UTF-8";
.row {
width: 100%;
margin-top: 0px;
margin-right: 0px;
…
…

</ul>

  </div>

  <div class="column_60 right_half">
    <h2 class="column_title">RIGHT COLUMN</h2>
  </div>

</div>

Answer №1

Implement text-align: left on the elements within .taskPreviewWrap li.

For elements with class .t-Date, adjust margin-left: -197px to margin-left: 40px as needed.

Improved Fiddle Link

@charset "UTF-8";
.row {
width: 100%;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 0px;
display: inline-block
}
.row.blockDisplay {
display: block;
}
.column_60 {
width: 55%;
float: left;
margin-top: 0px;

...

.t-ShortDesc{
font-weight:bold;
font-size:9pt;
letter-spacing:-0.2px;
font-family:Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
display:inline-block;
vertical-align: top;
position:absolute;
text-overflow: ellipsis; /* will make [...] at the end */
    width: 22%; /* change as necessary */
    white-space: nowrap; /* single line paragraph */
    overflow:hidden; /* older browsers */
margin-left:24px;
margin-top:-17px;
}
<div class="row"></div>
<div class="row blockDisplay">
  <div class="column_40 left_half">
    <ul class="taskPreviewWrap">
      <li>
        <div class="dragdotsicon"></div>
        <span class="t-Date">05.18.16</span> 
        <span class="t-ShortDesc">I want all the text and dates in this line to stay to the left next to the dots icon instead of moving due to divs width expanding</span>
      </li>
      <li>
        <div class="dragdotsicon"></div>
        <span class="t-Date">05.18.16</span> 
        <span class="t-ShortDesc">I want all the text and dates in this line to stay to the left next to the dots icon instead of moving due to divs width expanding</span>
      </li>
      <li>
        <div class="dragdotsicon"></div>
        <span class="t-Date">05.18.16</span> 
        <span class="t-ShortDesc">I want all the text and dates in this line to stay to the left next to the dots icon instead of moving due to divs width expanding</span>
      </li>
    </ul>
  </div>
  <div class="column_60 right_half">
    <h2 class="column_title">RIGHT COLUMN</h2>
  </div>
</div>

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

Avoiding the repetition of CSS animations during Gatsby page hydration

I am facing an issue in Gatsby where I have an element with an initial CSS animation. It works perfectly when the static site loads, but after hydration, it keeps repeating. Is there a way to prevent this from happening? Below is my styled components code ...

Tips for leveraging Backbone.js for creating dynamic single page websites

I am eager to create my own personal website with a unique functionality similar to this example: The idea is to have the entire website contained within a single HTML page, where clicking on a navigation item will dynamically load only the necessary info ...

Centering an icon vertically and introducing animation upon hovering over an image

I'm having difficulty with vertically centering an icon that drops down on image hover, and I want to make its transition smoother. Currently, it's dropping down too abruptly and no matter what transition property I apply (ease, ease-out, etc.), ...

Is there a way to illuminate a complete row by simply hovering over a span within one of the columns?

If I want to change the background-color of a div with classes "row" and "highlightThisRow" when hovering over a span with the class "fromThisSpan", how can I achieve that? In a list, there are multiple rows with several columns. The span in question is l ...

Tips for modifying hover effects using jQuerystylesheet changes

I attempted running the following code snippet var buttonElement = $('<button>Button</button>'); $('body').append(buttonElement); buttonElement.hover().css('background-color', 'red'); Unfortunately, the ...

stop an html page from opening a new window

When using my HTML-based application, there are instances when it needs to open another URL within an iframe. However, a problem arises when the third-party URL within the iframe also opens a new window with the same content and URL. How can I prevent th ...

Adjusting Table Width with Bootstrap Styling

https://i.sstatic.net/MIkw0.png Could someone please advise on how to adjust the width of the Bootstrap HTML table above? It appears to be spreading out across the entire browser screen. Thank you. # in this section, I inserted bootstrap into my html tab ...

Chrome is inaccurately reporting the outerHeight value, while IE and FireFox are displaying it correctly

The jquery.smartWizard plugin includes a function called fixHeight that adjusts the height of a wizard step. It is utilized when displaying a step for the first time or revealing hidden divs within the step. The function works correctly in IE and FireFox, ...

Eliminating unnecessary white space while utilizing the first-letter CSS property

Is there a way to remove the extra whitespace added under the first line when making the first letter of a paragraph bigger than the rest of the text? I already tried adjusting padding and margins on p::first-line without success. p{ line-height: 1.4; } p ...

Move the element outside of the parent container

I am in the process of creating a collapsible sidebar using bootstrap, and I am attempting to have a submenu appear outside of the sidebar when it is toggled to a mini navigation. For example: When the window size is greater than 767 pixels and you click ...

Tips for showcasing numerous images in a single row on a website

Looking to organize images into rows with 3/4 images in each row, not stacked vertically as shown below. Here is the code I have tried: <html> <head> <title>Images Displayed in Rows</title> <meta charset="utf-8"> <meta ...

Adjusting the width of a nested iframe within two div containers

I am trying to dynamically change the width of a structure using JavaScript. Here is the current setup: <div id="HTMLGroupBox742928" class="HTMLGroupBox" style="width:1366px"> <div style="width:800px;"> <iframe id="notReliable_C ...

What causes z-index to be ineffective with sticky elements?

In my website, I've implemented rollover effects in a sticky footer and a responsive menu that stays at the top. However, when the menu is opened and extends over the footer, it covers everything except the rollovers. Closed navigation http://www.mus ...

Convert Jupyter notebook to an executable html file

Looking for a way to export a Jupyter notebook in HTML to get an executable version? Currently, I upload the notebook to a git repository and use binder to obtain its executable form. However, I want to directly upload the notebook to my website without ha ...

Three divs are set in place, with two of them of fixed width while the third div is

Looking for a layout with specific positioning and fixed widths: One box on the left, one box on the right, each with a width of 200px. The middle div should adjust to take up the remaining space. Any suggestions are appreciated. Thank you! ...

Utilize the Appy Wordpress Widget in your designated widget region

This is my first time working with WordPress, and I am attempting to add a custom Widget to an HTML box. Here is the HTML: The blank News box Following some tutorials, I created a new Widget area inside my functions.php file using the following code: &l ...

Begin one lesson, end all others

Looking for help with my expandable list menu that I created using jQuery. Here is the code snippet: $("#menu ul li ul").hide(); $("#menu ul li").click(function() { $(this).find("ul").slideToggle(); }); You can view the fully functional menu on jsFi ...

What is the method to execute jQuery code after the completion of a fade out effect?

I am attempting to fade out a div upon click while also adjusting some CSS properties. The problem I am encountering is that the CSS properties change during the fade out transition, instead of after it has completed. I would like the values to change onc ...

The Asp.net MVC Navigation Bar

I'm facing an issue with the navbar in asp.net mvc Here is my code snippet <li class="nav-item nav-link" role="presentation"> <a class="nav-link" @Html.ActionLink("Customers", "Index", "Customers") /&g ...

Undefined error encountered in the Google Places library

I'm new to working with the Ionic framework and was experimenting with implementing an autocomplete search feature using the Google Maps API. After going through several resources, I included the following code: <script type="text/javascript" src ...