Is there a way to make two divs stack on top of each other without using media queries, while ensuring that text

I have successfully created a responsive video for my website and wrapped text around the video, but now I'm struggling to make them work together seamlessly.

My ideal scenario is:

For the desktop version:

To look like this: Mobile version

The best solution I've come up with so far is having the content stack on top of each other or the text wrapping around the video not stacking. How can I achieve both simultaneously?

Everything must be done inline using HTML and CSS only because it needs to integrate into my POS system, which has limited capabilities.

<div style="max-width:1000px; width:100%;font-size:0px;">
<!--VIDEO-->
<div style="float:right;width:100%; max-width:450px; display:inline:block;">
<div style="width:100%;position:relative; padding-bottom:56.25%; height:0px;">
<iframe style="position:absolute; top:0; left:0; width:100%; height:100%;" height="441" width="480" src="[VIDEO SOURCE]" frameBorder="0" allowfullscreen></iframe>
</div>
</div>
<!--END VIDEO-->

<p style="font-size:20px; width:100%; max-width:550px; display:inline-block; vertical-align:top;">TEXT HERETEXT HERETEXT HERETEXT HERETEXT HERE... (continues) ...HERETEXT HERETEXT HERETEXT HERETEXT HERETEXT HERETEXT HERETEXT HERE
</p>
</div>

Answer №1

I made some adjustments to your code, but I'm not sure if it will be helpful for you. Please take a look at it. :)

<div style="max-width:1000px; width:100%;font-size:0px;">
<!--VIDEO-->
<div style="float:right;width:100%; max-width:450px;">
<div style="width:100%;position:relative; padding-bottom:56.25%; height:0px;">
<iframe style="position:absolute; top:0; left:0; width:100%; height:100%;" height="441" width="480" src="[VIDEO SOURCE]" frameBorder="0" allowfullscreen></iframe>
</div>
</div>
<!--END VIDEO-->

<p style="font-size:20px;">UPDATED TEXT GOES HERE
</p>
</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

Using html-mode in emacs to create a hyperlink

My image src text in emacs has become clickable. I would like to have plain text instead. How can I disable this feature? <img src="index_new_menus_files/menu_bg_2.gif" alt="" border="0" height="55" width="150"> Instead, I want it to be: <img s ...

Hover effect on navigation in CSS

Having trouble achieving a hover effect and could use some help. I'm working on creating a tab-style navigation menu where I want the tab to expand from the top when hovered over. However, my current CSS code is causing the tab to expand both at the ...

Slide your cursor over to reveal a picture

I'm looking to create an interactive image gallery where the user can hover over an image to reveal text below it. I've been trying to achieve this by setting up my images in a specific way: echo "<div class=textimage style=background-image:u ...

Viewing a document generated using the Google Drive API using the Google Drive Viewer

Using the Google Drive API, I am able to generate a document and receive some URLs: alternateLink : https://docs.google.com/document/d/xxxsome_idxxxxx/edit?usp=drivesdk embedLink https://docs.goo ...

Can a clipped object in JavaScript be duplicated on the opposite side of the screen?

Exploring javascript, I have pondered the idea of having an object clip off a screen and seamlessly appear on the other side as if the page was endless. To illustrate my concept more clearly, I have provided an image link below: https://i.sstatic.net/DCpZ ...

CSS - Simplifying the Process of Creating Multi-Level Menus

I have a multi-level menu that I want to customize with the following specifications: Same background color (#5b740d) Same active background color (red) Same hover background color (red) The code I found on the internet was too complex, so I tried to si ...

Utilizing image backgrounds for hyperlinks in the Android browser

Encountering a minor issue with some <a> tags that have images as background, and the text inside the tags is indented using CSS. However, on the Android browser, part of the string used in HTML appears to cover the background image within the area o ...

Generate an HTML table dynamically from a PostgreSQL query

I am facing a challenge that may be simple for experienced individuals but is proving to be difficult for me as a newbie. The task at hand involves retrieving JSON data from a database query and displaying it in an HTML table using Node.js, Express, and Po ...

What is the best way to incorporate several functions within a resize function?

Is it possible to incorporate multiple functions within the windows.width resize function? I have been experimenting with some code, but I would like to restrict its usage to tablet and mobile devices only, excluding laptops and PCs. Any suggestions on h ...

"Implementing a responsive design with a background image and radial gradient - how to

The image currently in use: https://i.stack.imgur.com/piK6l.jpg Here is how I've implemented it using Vue.js, Bootstrap, and CSS: Code Snippet <div class="landing"> <div class="container text-white details h-100"> ...

Expanding iframe elements

I am having difficulty adjusting the size of the iframe content (within a fixed-sized iframe). Essentially, I would like the content to scale smaller or larger as if the browser's zoom function was being used. Through my CSS experiments, it seems achi ...

Guide on limiting users to upload a maximum of three images per month with PHP and MySQL

Working on PHP and facing a challenge - How can I restrict a user to upload only three images in a month? The MySQL Database table structure is as follows: CREATE TABLE `images` ( `id` int(40) NOT NULL, `user_name` varchar(40) NOT NULL, `mobile` va ...

Button halts the playback of numerous audio tracks simultaneously

I'm in the process of creating a Launchpad, where each row consists of 8 buttons/audio tracks and a stop button. My goal is for each stop button to halt all audio playing on that specific row when pressed—for instance, pressing Stop Button 1 would c ...

The <img> element is able to fill an entire div while maintaining its original aspect ratio

I am currently facing a challenge with implementing a responsive gallery slider in Bootstrap. In order to achieve responsiveness, I need to use properties like max-height. The issue arises from the fact that the images in the gallery can vary in size and ...

What is the best way to display the elements of an array within an HTML div element?

I've been trying to display the contents of an array in a div container on my HTML file, but I'm stuck. Here's what I currently have: function printArray() { var $container = $('.container'); $container.html(''); ...

Sliding Feature

Can someone assist me with implementing a jQuery half slide function from left to right? Please check out the following URL for more information: http://jsfiddle.net/prabunivas/Fy9Hs/2/ <div> <div id="col1" style="float:left"> &l ...

How to retrieve an element in jQuery without using the onclick event listener

I'm looking to extract the element id or data attribute of an HTML input element without using the onclick event handler. Here is the code I currently have: <button class="button primary" type="button" onclick="add_poll_answers(30)">Submit</ ...

Tips for avoiding multiple calls to onchange functions in JavaScript

I'm facing an issue with my code and I can't figure out why this is happening. In my JavaScript, I'm using multiple function calls on the onchange event. When a user enters values into the fields, other values are changed by JavaScript funct ...

Exploring the paths of assets within CSS files in Symfony 2

Issue I am facing a dilemma with my CSS file that contains paths for images, fonts, etc. using the CSS syntax url(..). The structure of my paths is as follows: ... +-src/ | +-MyCompany/ | +-MyBundle/ | +-Resources/ | +-assets/ | +-css ...

Transitioning from Webpack version 4 to version 5 resulted in a failure to detect certain styles

After migrating my React project to Webpack v5, I am facing an issue where none of my .scss files are being picked up when I run the project. I meticulously followed the guide on migrating webpack https://webpack.js.org/migrate/5/, updated all plugins and ...