"The Fieldset Legend Mystery: Unraveling Internet Explorer's

I'm at my wit's end.

Currently, I am customizing the front end of an ASP.NET built website, and one of the sections includes a fieldset with a legend. However, this specific area appears differently on IE, Firefox, and Chrome. Out of the three, IE looks the most out of place. Unfortunately, due to the limitations of this project setup, I am unable to load browser-specific stylesheets. However, I can utilize CSS browser-specific hacks within the existing stylesheet.

Here is the visual comparison of how it appears in different browsers:

Firefox View:

Chrome View:

IE View:

Below is the HTML and CSS code for the fieldset and legend:

#TabContainerAlerts_TabPanelBloodPressureAlerts_UpdatePanelBloodPressureAlerts > fieldset,
#TabContainerAlerts_TabPanelGlucoseAlerts_UpdatePanelGlucoseAlerts > fieldset,
#TabContainerAlerts_TabPanelWeightAlerts_UpdatePanelWeightAlerts > fieldset,
#TabContainerAlerts_TabPanelTemperatureAlerts_UpdatePanelTemperatureAlerts > fieldset,
#TabContainerAlerts_TabPanelOxygenAlerts_UpdatePanelOxygenAlerts > fieldset {
  border: 1px solid #7a8dab;
  border-radius: 10px;
  float: left;
  width: 81%;
  display: inline-block;
  margin-left: -5px;
  margin-top: 10px;
  margin-bottom: 10px;
}
#TabContainerAlerts_TabPanelBloodPressureAlerts_UpdatePanelBloodPressureAlerts > fieldset > legend,
#TabContainerAlerts_TabPanelGlucoseAlerts_UpdatePanelGlucoseAlerts > fieldset > legend,
#TabContainerAlerts_TabPanelWeightAlerts_UpdatePanelWeightAlerts > fieldset > legend,
#TabContainerAlerts_TabPanelTemperatureAlerts_UpdatePanelTemperatureAlerts > fieldset > legend,
#TabContainerAlerts_TabPanelOxygenAlerts_UpdatePanelOxygenAlerts > fieldset > legend {
  text-indent: 8px;
  display: inline-block;
  position: relative;
  top: -10px\9;
  /* IE 8 and below */
}
<fieldset id="FieldSetAlertsBloodPressureSystolic">
  <legend>
    Systolic

    <input id="TabContainerAlerts_TabPanelBloodPressureAlerts_CheckBoxBloodPressureSystolicAlertEnablement" type="checkbox" onclick="javascript:setTimeout('__doPostBack(\'TabContainerAlerts$TabPanelBloodPressureAlerts$CheckBoxBloodPressureSystolicAlertEnablement\',\'\')', 0)"
    checked="checked" name="TabContainerAlerts$TabPanelBloodPressureAlerts$CheckBoxBloodPressureSystolicAlertEnablement"></input>
  </legend>
  <div id="TabContainerAlerts_TabPanelBloodPressureAlerts_PanelBloodPressureSystolicAlerts">
    <div id="DivBloodPressureSystolicAlertSection">
      <div id="DivBloodPressureSystolicAlertNormalWrapper">…</div>
      <div id="DivBloodPressureSystolicAlertWarningWrapper">…</div>
      <div id="DivBloodPressureSystolicAlertCriticalWrapper">…</div>
      <div id="DivMultiSliderExtenderBloodPressureSystolicAlert">…</div>
    </div>
  </div>
</fieldset>

I am striving to achieve a consistent look across all browsers, resembling the appearance in Firefox. However, the challenge lies in aligning IE with the rest, particularly considering the alpha usage in the background.

Answer №1

One helpful CSS tip is to utilize the following code snippet:

div > span {
   width:50%;
   position:relative;
   top:-5px;
   background-color:red;
}

The width of 50% is just a suggestion, and feel free to change the red background color to match your design.

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

Is there a way to create a miniature camera or map within a scene in three.js without cropping the viewport?

Is there a way to create a mini-map or mini-cam using three.js? The idea is to have two camera views - one mini-map or "mini-cam" in the top right corner (as shown in the image) and the main camera view covering the rest of the scene without the border. ...

Presenting CSV data in a tabular format using Angular and TypeScript

I am facing an issue with uploading a CSV file. Even though the table adjusts to the size of the dataset, it appears as if the CSV file is empty. Could this be due to an error in my code or something specific about the CSV file itself? I'm still learn ...

Prevent the crawling of HTML segments by utilizing HTML-XSL parsing techniques

I am currently working with Watson Explorer FC 11.0.2 and I am facing a challenge in excluding certain HTML tags from the Watson crawlers. I am using an XSLT parser to extract metadata, title, and body from an HTML page located at the following path: "/h ...

What is the best way to keep a div element fixed at the top of a webpage?

I am facing an issue with a div that contains three SVG files layered on top of each other and meant to be centered on the page. Ideally, when the user scrolls down, I want these SVG files to stick to the top and remain there. In my CSS attempts, I have u ...

The function replaceState() is unable to create a history state with a URL in a document that has a different origin

In my main.js file located in required/javascripts on my server, I have the code window.history.replaceState(null, null, 'about');. On the about page (located at the root of my server), there is a link that uses window.history.replaceState(null, ...

Issue with SVG mask not functioning when transform is applied

I am struggling to apply a mask to a transformed SVG element. When I try to do this with a path, the structure is the same. If I apply the mask to an element outside of the transformed group, it works as expected. However, if I try to do the same inside, t ...

What steps should I take to create a slider using my image gallery?

I have a unique photo gallery setup that I'm struggling with: As I keep adding photos, the cards in my gallery get smaller and smaller! What I really want is to show only 4 photos at a time and hide the rest, creating a sliding effect. I attempted ad ...

Preventing a webpage from responding to events by utilizing either CSS or jQuery

I apologize if the title is unclear, but I couldn't find the right words to phrase my question. On my website -- -- there is an alert box that appears onLoad. I need to convert it into a modal box so that when it appears, users are unable to use the ...

How can I use Angular 7 to create a background image for a View made up of multiple components?

Here is the HTML code that I am working with: <app-navbar></app-navbar> <router-outlet></router-outlet> My goal is to have an image set as the background for the home view, which consists of two components: navbarComponent and hom ...

Adapting JavaScript functions from IE to work on Firefox and Chrome: A comprehensive guide

I have encountered an issue with a function that retrieves the selected text range within a contenteditable div. While it works perfectly fine in Internet Explorer, it doesn't seem to work in Firefox and Chrome. Could someone kindly provide guidance ...

The button event listener in React fails to trigger without a page refresh

Within my index.html file, I have included the following code snippet: <head> ... <script type="text/javascript" src="https://mysrc.com/something.js&collectorId=f8n0soi9" </script> <script ...

Tips on creating a Django query based on user-selected options from a drop-down menu

As a newcomer in an internship role, I have been tasked with creating a website where users can select a program, location, or theme to visualize on a heatmap. To achieve this, I opted to utilize Django. However, I am facing two challenges: Firstly, my M ...

bespoke filter designed to conceal any negative figures

I am trying to implement a feature where a text box will display nothing if the ng-model contains a negative value. I want the ng-model to remain unchanged while ensuring that negative values are not displayed. I am looking for a custom filter to achieve t ...

Issues have arisen with Google Maps functionality following the API integration, resulting in a blank grey

I am experiencing an issue with Google Maps where it is displaying a grey box or sometimes showing nothing/white. I have tried various solutions found online but none of them have worked for me. Does anyone have a solution? I even attempted to change the ...

Missing CSRF Cookie - A clue in the EventLog indicates a potential issue with MS Office

Kentico 10 is running on a Windows Server. An error keeps appearing in the Event Log multiple times per hour: The CSRF cookie was missing. This issue only happens on our production server, not on any of the development environments. I have tried to repro ...

Switch the text style when hovering, then switch it back upon second hovering

Searching for a method to modify the font of individual letters when hovering over them. The goal is for the letters to revert back to their original font after a second hover (not on the first hover-off). Any assistance would be greatly valued! ...

In Safari, the iPhone navigation bar is covering the buttons

My unique style controls the navigation buttons on the lower part of the screen, but unfortunately, the buttons are overlapping as shown in the screenshot. #navbar_mobile_extra_links { position: fixed; left: 0; right: 0; bottom: 0; back ...

Move your cursor over an image to modify the z-index of another image

I am facing an issue with my webpage that consists of 6 small images and one large image in the center, made up of six layers each containing one image, similar to this example: http://jsbin.com/onujiq/1/. I have set the z-index property of all center imag ...

Generating a list of items to buy using a JSON document

So here's the json file I'm working with: [ {"task":"buy bread","who":"Sarah","dueDate":"2023-10-18","done":false}, {"task":"clean car","who":"David","dueDate":"2023-08-30","done":true}, {"task":"write report","who":"Jenny","dueDate":"2023-09 ...

Getting the IDs of selected nodes all the way up to the root node in jsTree

How can I retrieve the IDs of all parent nodes from a selected node to the root node in jsTree? If node C is selected, how can I obtain the IDs of all its parent nodes? Tree Structure: B C +C1 +c2 The following code snippet only returns the imme ...