Here is a snippet of code I have generated for displaying warnings or errors in Dojo dialogs:
/* Relevant CSS styles */
.l-status-message-wrapper {
height: auto;
margin-left: 5px;
margin-top: 2px;
min-height: 15px;
}
.l-status-message-wrapper--dialog {
margin-left: 0px;
display: block;
word-wrap: break-word;
}
.c-global-message {
min-height: 15px;
color: #a5cf42;
font-size: 11px;
font-weight: bold;
text-transform: uppercase;
}
.c-global-message--error {
color: #e31d25;
}
.dijitDialog {
background: #eee;
border: 1px solid #d3d3d3;
-webkit-box-shadow: 0 5px 10px #adadad;
padding: 0;
}
.dijitDialog {
position: absolute;
z-index: 999;
overflow: hidden;
}
.dijitDialogTitleBar {
background: #C9CFD2 url(../../images/onglet_bg.gif) repeat-x;
vertical-align: middle;
}
.dijitDialogTitleBar {
background: #fafafa url(images/titleBar.png) repeat-x top left;
padding: 5px 6px 3px 6px;
outline: 0;
}
.dijitDialogTitleBar {
cursor: move;
}
form {
width: 200px;
height: 200px;
background-color: green;
}
The intention here is to limit the width of the
.l-status-message-wrapper--dialog
span without affecting the overall width of the .machineParameterDialogContents div. This should be done dynamically based on the content's width. The goal is not to set a fixed width
or max-width
for the container or any parent elements, and adjust automatically according to the widest element after the lengthy text component.
In this case, the span should not exceed 200px without explicitly setting a max-width property. Everything inside the machineParameterDialogContents div is loaded via Ajax requests, adding complexity to the design requirements.
Is it feasible to achieve this responsive behavior across different browsers like Chrome, Firefox, and IE11?