What happens to the content in a browser when the window is minimized?

The appearance of my application is enhanced when the browser window is maximized to its full extent, causing the content to be collapsed upon minimizing the browser window.

I prefer the content not to collapse. I have utilized a div that resembles a textarea to display the message in % only.

This is how my Jsp will look:

<div style="padding-left: 16px;" id="messageLayout">
    <div id="messageDisplayArea" > 

    </div>
</div>

My jquery functionality involves clicking the send button:

function send(){
    name = $("#name").val();
    message = $("#message").val();
    var time = "Time";

    var user = "<div id='user' class='fontStyle'>"+name+"</div>";
    var msg = "<div id='msg'  class='fontStyle'>"+message+"</div>";
    var timeStamp = "<div id='time'  class='fontStyle'>"+time+"</div>";

    var row = "<div id='msgSet' >"+ user + msg + timeStamp +"</div>";

    $("#messageDisplayArea").append(row);
}

This is my CSS:

#messageDisplayArea {
    height: 250px;
    width: 100%;
    overflow: auto;
    border-color: #6495ED;
    white-space: normal;
    border-style: solid;
    border-width: 1px;
    background-color: white;
}

#user {
    width: 10%;
    float: left;
    color: red;
    word-wrap: break-word;
}

#msg {
    width: 79%;
    color: green;
    float: left;
    word-wrap: break-word;
}

#time {
    width: 10%;
    float:left;
    color: gray;
    word-wrap: break-word;
    padding-left: 5px;
}

#msgSet {
    width: 100%;
    float:left;
    word-wrap: break-word;
    padding-bottom: 5px;
    padding-top: 5px;
}

Your valuable contributions are greatly appreciated.

Answer №1

Consider deleting the word-wrap: break-word property from your code.

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

Avoid unnecessary extra margin on CSS div elements

Currently working with Bootstrap4. In a row with 2 col-md-6 (totaling 12 columns for the row). However, experiencing an unwanted margin on the left column as shown in the image below. How can I remove it? https://i.sstatic.net/u5oix.png html: <hea ...

Strange symbols keep appearing in my output from PHP

My current task involves generating a SQL query based on some inputs. I have a predefined SQL statement, in which I perform certain replacements, that will use these inputs to generate the required SQL through an ODBC connection. For now, I have stored th ...

Unslider: Ensure images stay centered even on smaller screen resolutions

Utilizing Unslider in a recent project from . Managed to align the slider halfway, but facing an issue with off-center slides on resolutions of 1920px and lower. The image width is 3940px. Attempted to implement the code snippet from this answer like so: ...

Is there a way to ensure that the text stays positioned behind the initial image even as the window size is adjusted

<html> <head> <title> Example </title> <style> img:hover {opacity : 0.3;} img {z-index : 1; height : 33%; width : 33%; } .first { position : absolute; top: 0%; left: 0%;} .second {position : absolute; top: 0%; left: 33%; ...

Ways to ensure that an inner div causes the outer div to shift downward

Imagine I have a div. Within this div, there are two divs positioned side by side with the float left property. The div on the left is designated for an image. However, if the image is too tall, it does not expand the outer div to accommodate it. Instead ...

Enhancing your design with animated borders on hover

This unique border animation caught my eye and sparked my curiosity. I'm interested to know if it can be achieved using only HTML5/CSS for a hover effect. Have you discovered any other visually appealing hover animations worth mentioning? ...

Position the right div to float to the right with a dynamic width ahead of the left div in HTML to achieve

This particular challenge has proven to be quite difficult for me, and I have a feeling that I am overlooking something simple. My goal is to create a layout with a fixed-width left sidebar and a responsive variable-width content section on the right. Th ...

The element cannot be clicked at this point as another element would intercept the click:

Having an issue with clicking a button at the top of the page. The CSS selector works fine in my local Eclipse environment, but when trying to run it on Jenkins server on my local machine, it fails with an error stating that the element is not clickable. T ...

Subsequent Ajax requests are fetching outdated data

Thank you so much in advance. Situation: I am attempting to query a mySQL database using jQuery and AJAX with multiple fields. The initial search works correctly. However, when I update the fields and perform a new search, the data from the original sear ...

"Implementing responsive design with Bootstrap's carousel through media queries

I'm having some trouble creating a basic carousel using bootstrap because the images are not displaying full screen. Do I need to use media queries to achieve this and if so, how can I implement them? <div id="myCarousel" class="carousel slide" da ...

What is the best way to retrieve the duration of an object tag using JavaScript or jQuery?

My goal is to determine the duration and length of only mp4 type videos. Although I used the video tag to retrieve these values, it does not support mp4 files. Despite several attempts, I was unable to get the video tag to play only mp4 files, as it stric ...

Implementation of Datatable Server-Side Using Json/Ajax Demonstrated Successfully, with CRUD functionality pending

Introduction: My current project involves using a server-side datatable.net JQuery plug-in with JSON, AJAX, and ssp.class.php. Although I have managed to get it working, I am facing challenges while trying to create buttons for editing and deleting entries ...

If the corresponding link has not been clicked, the field should be set to hidden

Whenever a user clicks on a specific link, I dynamically load additional information and reveal a multi-select drop-down menu called holds[]. If the user chooses not to click on the "more info" link, then the holds[] drop-down menu will not be displayed, ...

What is the best way to fill radio buttons within a form that is being displayed as a string in PHP?

Looking for assistance with a PHP script that receives data from jQuery through AJAX and then executes a query to retrieve information from MySQL. Once the data is retrieved, I aim to populate a series of radio buttons within a form with this data. The for ...

What is the best way to eliminate HTML unicode content from the final item in a continuously changing list?

li:after{ content:"\00b6"; } <ol> <li>banana</li> <li>orange</li> <li class="last-class">apple</li> </ol> I am currently working on a dynamic list where the number of <li> tags varies over t ...

Is there a way to verify the presence of "li" elements before adding them?

I'm a jQuery beginner and I've been working on adding new <li> items to a list, but only if the item does not already exist. For instance: <ul id="myList"> <li>Item 1</li> <li>Item 2</li> </ul&g ...

Transferring a dynamic HTML file created using R's animation package onto a WordPress platform

After using the animation package in R to create an HTML file, I'm facing some challenges uploading it to my WordPress blog. It appears that additional js or css files may be required for proper functionality, but I'm uncertain about the process. ...

What is causing the CORS error with JQUERY and JQM?

My HTML5 page is set up without any jQuery and has no CORS error, as shown below: <!DOCTYPE html> <HTML> <button type="button" onClick="getBase64FromImageUrl()">Click Me!</button> <img id="preview1" crossorigin="anonymous" src=" ...

Superimpose above the tbody

I am attempting to implement a loading overlay specifically on top of the tbody element. My current method involves adding a tr as the last child of tbody and positioning it using position: absolute, while setting the parent tbody with position: relative. ...

Display different images based on user selection in vue.js

I am new to working with vue.js and I'm facing a challenge. My goal is to display images of NBA players based on the selected criteria using vue.js. For instance, if the Dunk contest champion is chosen, only images of Kobe and Jordan should be display ...