New Issue in Firefox 15: When using divs, content spills over into border images

Before anything else, I want to acknowledge the unprefixing of -moz-border-image in Firefox 15. You can read more about it here: . I made adjustments to my CSS to accommodate Firefox 15. However, I am facing a different issue that needs attention.

To elaborate, in Firefox 15, the content within a div with border-image now crosses over the said border-image, making it seem like the border is part of the interior of the div. Other browsers do not exhibit this problem and function as expected, which makes it difficult for me to simply adjust the padding to compensate for the border (as other browsers would end up having excessive padding).

Do you have any suggestions on how to resolve this matter? Thank you!

You can view an example page here

This is my code:

<style type="text/css">

    body { background: yellow; }

    .borderbox {
    -moz-border-image: url(border_sprite.png) 31 25 25 20 / 31px 25px 25px 20px repeat stretch;
    -webkit-border-image: url(border_sprite.png) 31 25 25 20 fill repeat stretch;
    -o-border-image: url(border_sprite.png) 31 25 25 20 repeat stretch;
    border-image: url(border_sprite.png) 31 25 25 20 fill repeat stretch;
    border-width: 31px 25px 25px 20px;
    border-image-width: 31px 25px 25px 20px;
    padding: 0 10px 20px 0;
    text-align: right;
    overflow: auto;
    width: 400px;
    height: 400px;
    color: purple;
    font-size: 20px;
 }

</style>

<!DOCTYPE html>
<head></head>
<body>

<div class="borderbox">
    The content should be contained within the inner white box. Why is it also covering the blue border in Firefox 15?
</div>

</body>
</html>

Answer №1

At last, the solution has been uncovered - unexpectedly simple but effective. Just include this property in the div's style:

border-style: solid;

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

Expanding the width of a child element causes it to exceed the boundaries of its parent

When I increase the width of a child element, it sometimes goes outside the boundaries of its parent element. The child element tends to only expand towards the right side, so I tried using the float property on the child element. Is there a CSS trick that ...

Shimmering effect on hover for CSS animation

Is there a way to create a CSS-only animation that fades in and out until hovered when displayed in full? I can achieve both effects separately, but I'm struggling to make them work together. The hover element doesn't seem to be functioning prope ...

Stop header background image from loading on mobile browsers by utilizing the <picture> tag

Is there a method to utilize the <picture> element in order to prevent a page from downloading an image when viewed on a mobile phone? I have a website that features a header image. Unfortunately, due to the site's functionality, using CSS (bac ...

Using inline styles can cause Content Security Policy (CSP) violations in applications

I have been diligently working on an application for quite some time using create-react-app. Recently, I decided to update to the latest version of React only to find out that a new Content Security Policy (CSP) has been implemented. To my dismay, upon tr ...

The updateItem function in the JSGrid controller was not called

Currently, I am working on a project involving js-grid. However, I have encountered an issue where the updateitem function of the controller is not being invoked when attempting to update a column field. Additionally, the field resets to its old value wi ...

What are some methods to manipulate the appearance of text with jquery?

I am having trouble with jQuery and it seems like it's not working properly. Can anyone help me locate the error? My aim is to create a "Read less" button that will show more content when clicked. However, when I click on "Read More", nothing happens. ...

Unable to locate the iframe in the test scenario

I encountered this particular test case: Select Frame id=coach_frame63454108.cf1 Wait Until Element Is Visible ${ap.gui.header.appname} Page Should Contain Element ${ap.gui.header.appname} Page Should Contain Element ${ap.gui.hea ...

Tips for avoiding automatic correction of HTML source code in web browsers

Check out the initial html code below: <html> <head> <title> aaaaa<bbbbb </title> </head> <body> </body> </html> An error can be spotted in the title tag where there is an unclose ...

I'm currently working on a course assignment and I've encountered an issue where nothing happens when I try to execute node

Having trouble with the readline for input execution. Any helpful hints or tips? I've been using it in the same file for all exercises, checked stackoverflow too but realized I'm on Windows. This is my code const { rejects } = require('asse ...

Using a custom HTML file as a container in an Android WebView

I am trying to include each loaded page within my own custom HTML file. My app needs to first parse the loaded page, select the body tag, insert it into my custom HTML file, display it in a WebView, and continue this process for each subsequent page. I h ...

Chrome on Android is experiencing issues with the navigator.mediaDevices.getUserMedia function in WebRTC

Currently, as I delve into a basic React example using WebRTC (simple-peer), I find myself encountering an issue: navigator.mediaDevices.getUserMedia({ video: true, audio: true }).then(stream => { setStream(stream); if (userVideo.current) { ...

What is causing my divs to behave as if I set a margin-top/margin-bottom of one and a half centimeters?

I'm currently developing an AngularJS application and I've encountered some issues with unnecessary whitespace. <div class='user' ng-repeat='session in sessions'> <div class='text' ng-bind='monolog ...

Items in a CSS masonry container with a 'column count' feature showcasing drop shadows that elegantly span across multiple lines

I've been experimenting with CSS column count to create a masonry effect for my items. Everything was going smoothly until I added a subtle drop shadow to the items. Upon closer inspection in the jsfiddle link provided, you'll notice that the dr ...

Encountering the error message "AngularJS error: $(...).modal is not a function" after updating from Bootstrap 3.3.6 to version 4.0

Since updating the bootstrap version in my application from 3.3.6 to 4, I've been encountering an error stating that $(...).modal is not a function. This was previously working fine before the update. angular.js:14700 TypeError: $(...).modal is n ...

Restrict HTML Elements Based on Their Size

I have a text file with a substantial amount of content that I need to display in an HTML format. The challenge is that I only want to show a portion of the text on the screen, but I am unsure of the exact amount that needs to be displayed. What I do know ...

Ways to avoid an element from overflowing in css

As I embark on the journey of creating a logo and a menu icon for my header, I am encountering an issue where they always exceed the specified height of the header. This unexpected overflow is causing me some frustration. I am aware that using the overflo ...

Maintaining a one-line CSS menu layout, the middle element is designed with two inner elements that seamlessly stack without disturbing the appearance of the menu items

I'm facing a challenge with aligning the two elements in the "inline" class - I need them stacked so that the element containing "SECURITIES" is under "A.M.S". The issue arises when I try to add a line break after the A.M.S element, which also affects ...

The validation process is still failing even though the correct credentials have been entered

I'm diving into the world of Javascript and DOM today, but I've hit a roadblock. Can you take a look at this code snippet and help me figure out what's causing me to always end up in the else block, no matter what I input in the text field? ...

What is the best way to align a radiobutton directly beneath a div container

Seeking guidance as a beginner in HTML and CSS. I want to position a radiobutton below a div element, but currently it's positioned to the right. <div class="rates"> <? foreach ($rates as $rate) { ?> <div class="rat ...

Creating a CSS rollover effect for your logo on a WordPress website

Struggling to implement a CSS image rollover on a Wordpress header logo. The solution may be simple for you experts, but I can't find it anywhere on Stackoverflow. Could it have something to do with the position? Adding :relative or :absolute doesn&ap ...