Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Identical test cases, two different backgrounds

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #192173
    drone4four
    Participant

    I have two test cases. The css and html is identical. But the background image parses differently for both.

    Here is my first test case: http://codepen.io/Angeles4four/pen/bNBYaP

    Here is my second test case: http://www.angeles4four.info/testcast-jedacad/index.html

    In the codepen instance, the background image scales and stretches perfectly. But on my webserver there is an ugly line down the left indicating that the bg image has been split. Why is there a discrepency between the two identacle test cases?

    Also, do you notice that the rectangle frame at the bottom of in the testcase on my webserver? Why is it doing that? I checked the palcement of the div elements, and they are where they should be in my html file.

    #192175
    Senff
    Participant

    Obviously it’s not identical code — if it was, the results would be identical too. :)

    The difference is that the page on your server loads http://www.angeles4four.info/testcast-jedacad/css/style.css, but the one on Codepen doesn’t (you’re using a relative path).

    The CSS you’ve entered in your pen is different from the CSS in http://www.angeles4four.info/testcast-jedacad/css/style.css

    The specific difference that makes the background look different, is this line that you do have in your style.css file (but that is not used in your pen):

    html {
        margin: 0 10em;
    }
    

    Also, do you notice that the rectangle frame at the bottom of in the testcase on my webserver?

    Not seeing that! But probably the same reason — using different CSS styles.

    #192180
    drone4four
    Participant

    Senff: Thank-you for noting what distinguishes the one instance from the other. I thought they were identical, but now I see they are not since you’ve pointed out the extra html rule. The rectangle frame now renders correctly too. Problem solved.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.