Is it possible to wrap scrolling text around an image for alignment?

I'm seeking a way to align my text with this tilted image, but the issue is that the text is scrolling. Is there any solution to address this?

My objective is to maintain the bolded "TITLE HERE" straight across the image while allowing the placeholder text to scroll, all while aligning it with the large image on the left. Is this achievable? Thanks in advance for your assistance.

      /*CUSTOMIZE BODY HERE*/

body {
  background: WHITE;
  background-attachment: fixed;
  font-family: montserrat;
}

a {
  text-decoration: none;
  color: #999;
}

a:hover {
  color: indianred;
}

.title {
  font-family: montserrat;
  font-weight: 900;
  font-size: 6vw;
  position: relative;
  width: 90%;
  left: 200px;
  margin-top: 0%;
}

.title2 {
  font-family: montserrat;
  font-weight: 900;
  font-size: 1.10vw;
  position: static;
  width: 90%;
  margin-left: 45%;
}

.scrollingtext p {
  width: 100%;
  padding: 0 10%;
  font-size: 13px;
}


/*IMAGE ALIGNMENT*/

.image {
  z-index: -1;
}

.image img {
  position: fixed;
  width: 50%;
  left: -3.5%;
  z-index: -1;
  -webkit-clip-path: polygon(25% 0%, 100% 0%, 71% 100%, 0% 100%);
  clip-path: polygon(25% 0%, 100% 0%, 71% 100%, 0% 100%);
}


/*CELL TABLE STYLE*/

.tablerow {
  display: table-row;
  width: 100%;
}

.table {
  display: table;
}

.cell {
  display: table-cell;
}

.right {
  width: 50%;
}

.left {
  width: 40%;
}

.mobile {
  display: none;
}
...
<!--INSERT IMAGE-->
<div class="image">
  <img src="http://via.placeholder.com/350x1150">
</div>


<div class="scrollingtext">

  <!--DESKTOP TITLE AND BYLINE-->
  <div class="title">TITLE HERE
    <p>
  </div>

  <div class="title2"><a href="http://www.twitter.com/#"><strong>AUTHOR HERE</strong></a> / TITLE</div>
  <!--MOBILE TITLE-->
  <div class="table">
    <div class="tablerow">
      <div class="cell left desktop"></div>

      <!--DESKTOP TITLE AND BYLINE-->
      <div class="title">
      </div>


      <div class="cell farright"></div>

    </div>

    <div class="tablerow">

      <div class="cell left desktop">
      </div>


      <div class="cell right">


        <!-- PLACEHOLDER TEXT BELOW -->
        <p>This is a set of placeholder text to show an example...</p>

      ...
      ...

        <p>This is a set of placeholder text to show an example...</p>



      </div>
    </div>
  </div>
</div>

Answer №1

To achieve this effect, you can use CSS to make the image float within the same element as your text.

Here is an example of how you can do it:

#my_container {
  width: 400px;
  text-align: justify;
}

#my_image {
  width: 100px;
  height: 100px;
  float: right;
  border: 1px solid #000;
  margin: 10px;
}
<div id="my_container">
  <div id="my_image">image here</div>
  And a lot of copy and paste to fill this example.
  And a lot of copy and paste to fill this example. 
  And a lot of copy and paste to fill this example. 
  And a lot of copy and paste to fill this example.
  And a lot of copy and paste to fill this example.
  And a lot of copy and paste to fill this example. 
  And a lot of copy and paste to fill this example.
  And a lot of copy and paste to fill this example.
  And a lot of copy and paste to fill this example. 
  And a lot of copy and paste to fill this example.
  And a lot of copy and paste to fill this example. 
  And a lot of copy and paste to fill this example.

<div>

Answer №2

To resolve the Title issue, simply incorporate this css:

.title{
    font-family: montserrat;
    font-weight: 900;
    font-size: 6vw;
    width: 90%;
    position: fixed;
    top: 50%;
    left: 10%;
}

Answer №3

There is a potential solution, but the outcome may not be ideal for scrolling.

Consider trying the following method: Create empty div elements with widths matching your image and float them to the left so that text will wrap around them.

#container{
width :400px;
height:400px;
border:1px solid #000;

}
.filler{
float:left;
clear:left;
border:1px solid #000;
height:15px;
}
#filler1{
width:200px;
}
#filler2{
width:190px;
}
#filler3{
width:180px;
}
#filler4{
width:170px;
}
#filler5{
width:160px;
}
#filler6{
width:150px;
}
#filler7{
width:140px;
}
#filler8{
width:130px;
}
<div id="container">


<div id="filler1" class="filler"></div>
<div id="filler2" class="filler"></div>
<div id="filler3" class="filler"></div>
<div id="filler4" class="filler"></div>
<div id="filler5" class="filler"></div>
<div id="filler6" class="filler"></div>
<div id="filler7" class="filler"></div>
<div id="filler8" class="filler"></div>

some example text to copy and paste to fill the space.
some example text to copy and paste to fill the space.
some example text to copy and paste to fill the space.
some example text to copy and paste to fill the space.
some example text to copy and paste to fill the space.



</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

Adjusting the height of one div to match another dynamically

I'm fairly new to HTML and CSS, but I have a basic layout in mind that I'd like to achieve. Currently, I have two "child" divs set up in a row-based flexbox format controlled by the main "parent" div. One of these child divs contains images, whil ...

When using Phonegap in conjunction with AngularJS ng-view, the full-screen mode cannot be

I have seen similar questions asked before, but none of the solutions I found have worked for me so far. Here are some key parts of my index.html file: <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, ...

Marquee Widget from Dashing.io

I am currently utilizing dashing.io and aiming to construct a widget featuring a marquee effect. I managed to achieve the desired result using CSS animation along with HTML (http://jsfiddle.net/oLLzsyud/). However, upon integrating it into the widget, it a ...

Ways to automatically adjust the margins of my HTML body page

I'm currently working on a school project to develop a website. The challenge I'm facing is customizing the navbar and header background colors in such a way that they extend seamlessly to the end of the page. Despite my efforts, there seems to b ...

Is it possible to rearrange the columns and right justify them for smaller mobile devices?

The html code I am working with is as follows: <ol class="log"> <li class="row"> <p class="col-1 time"> 17:45 </p> <div class="col-md-10"> Here’s a comment </div> <p class="col-1 m ...

To insert a new row into a table with an onClick function, along with removing this attribute from all other rows except for the newly added one

I recently created a piece of code that enables the addition of a new row and removes an (onClick) attribute when clicking on an existing row within a table. <table style="vertical-align:middle;margin:20px;" id="table_insert"> <tr id="tra" > ...

<ul><li>issue with indentation

Is there a way to eliminate the indent from my unordered list? While inspecting the element, I noticed what appears to be padding between the width of the box and the content. However, setting padding to 0px and margin to 0px doesn't seem to work as t ...

Learn the steps to achieve the following outcome with Bootstrap 4

After experimenting with progress bars, I found that the problem lies in displaying the remaining part of the progress bar. https://i.sstatic.net/S35jd.png For instance, when I specify a width for the progress bar, the remaining percentage appears as gra ...

Is the Bootstrap Navbar Toggle Opening Upward? Can't seem to get the Toggle to Close on Click?

Recently, I've been facing an issue with the MDBootstrap Navbar Collapse feature. Despite reaching out to MDBootstrap for help, I haven't received a solution yet. Someone suggested using Angular, but since I am currently using JQuery and have hea ...

Enhancing jQuery Component while making an Ajax request

When a user clicks a button, I am making an ajax call to send out multiple emails. My goal is to update a "Please wait..." div before and after the call with status updates, as well as report any errors that may occur. However, I have encountered an issue ...

Is it possible to switch the orientation of the input fields from vertical to horizontal?

My custom form is displayed below: <form novalidate class="form-group" ng-hide="tab==1"> Reviews Min: <input type="number" ng-init="revNum=0" class="form-control" min="0" step="10" ng-model="revNum" /> Min Price: <input type="numbe ...

Preventing flexbox containers from being affected by overflow elements

I am looking to implement overflow: scroll within a flexbox layout. I am unsure of how to link an image directly from my Google Drive, so I have provided the URL instead: https://drive.google.com/open?id=17uM5twoprxmbo5xQ37kgeTaMwn7FGSu_ When using the o ...

How can I eliminate the border from the last child in a row within a responsive framework?

Put simply, I am trying to target not only the last child in a parent div, but also the last item in a row that adjusts based on screen size. I have a row of 4 elements (divs) with borders on all but the last one using :last-child. However, when the screen ...

Animate the chosen text via specialized effects

I am trying to implement a show/hide feature for specific text using jQuery. The challenge I am facing is having multiple instances of the same text tag with identical ids. I want to trigger the animation on a particular child element when hovering over it ...

Is it possible to change the order of elements in the navbar using HTML/Bootstrap depending on the state of the responsive menu toggle?

I am attempting to implement a responsive Bootstrap 4 navbar within Angular 8. When the menu is closed, the element order is correct: COMPANY, BROWSE, LOGIN The issue arises when I open the menu and the #menu receives the navbar-collapse flex attributes: ...

Adjust the loading bar component in Material UI to allow for customizable color changes

I am currently learning how to use material ui. My goal is to customize the loading bar's CSS. I checked the documentation and utilized colorPrimary classes. However, the changes are not appearing as expected. Could you please guide me on how to resol ...

Animate the page transition with jQuery once the CSS animation finishes

My screen is split in two halves, and when you click on a side, they are supposed to slide open like curtains and then fade into another page. I have successfully created the animation using CSS and jQuery to add the appropriate class on the click event. ...

Leverage XMPP with the power of HTML5

I have been intrigued by the integration of xmpp (Extensible Messaging Presence Protocol) with html5 and javascript. How can one implement an xmpp chat in html5? ...

Ways to eliminate whitespace in React and Bootstrap 5

I have a pet project that requires mobile responsiveness, and I'm encountering an issue with white space in the Carousel component. I am unsure of how to remove it - can anyone provide assistance? Here is how the page looks on PC: https://i.sstatic.n ...

Issues with the functionality of jQuery append and AngularJS ng-if not functioning

In my application using checkboxes, I control the visibility of charts with the ng-if directive and implement drag-and-drop functionality with angular-Dragula. The use of ng-if is essential for me as it allows me to manipulate visible div IDs and organize ...