X
Tap here to go to the mobile version of the site.

ஆதரவு மன்றம்

Error when using CSS selector

  • 9 replies
  • 2 இந்த பிரச்னைகள் உள்ளது
  • Last reply by Star Light
பதிவிடப்பட்டது

It really trouble. I think "background-image" selector has an error, when I type right statement it is not working. Image doesn't appear on background, but when I make 1 wrong statement (any-statement, HTML or CSS) then "background-image" selector works?!

Could anyone explain me why it be like this? :'(

Here is my code use for my Thimble:

<style>
      body {
        background-image: url(http://takeinsocialmedia.com/wp-content/uploads/2014/04/norway-mountain-river-images-photos-0321205905.jpg);
        background-size: 100%;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: scroll;
        margin: 0;
        padding: 0;
        font-family: Tahoma, Arial
      }
</style>
It really trouble. I think "background-image" selector has an error, when I type right statement it is not working. Image doesn't appear on background, but when I make 1 wrong statement (any-statement, HTML or CSS) then "background-image" selector works?! Could anyone explain me why it be like this? :'( Here is my code use for my Thimble: <pre><nowiki><style> body { background-image: url(http://takeinsocialmedia.com/wp-content/uploads/2014/04/norway-mountain-river-images-photos-0321205905.jpg); background-size: 100%; background-position: center; background-repeat: no-repeat; background-attachment: scroll; margin: 0; padding: 0; font-family: Tahoma, Arial } </style></nowiki></pre>

cor-el மூலமாக திருத்தப்பட்டது

Additional System Details

பயன்பாடு

  • User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36

கூடுதல் தகவல்

iamjayakumars 489 தீர்வுகள் 5951 பதில்கள்
பதிவிடப்பட்டது

Hi, Try like this

  • background-image: url(http://thisisanimage.jpg);

More to know about Thimble CSS Cheat Sheet

Hi, Try like this *'''background-image: url(http://thisisanimage.jpg);''' More to know about Thimble CSS Cheat Sheet *https://bethnewhouse.makes.org/thimble/css-cheatsheet
பதிவிடப்பட்டது

கேள்வியின் உரிமையாளர்

Sorry, I didn't give clearly my problem, am I?

<style>

     body {
       background-image: url(http://takeinsocialmedia.com/wp-content/uploads/2014/04/norway-mountain-river-images-photos-0321205905.jpg);
       background-size: 100%;
       background-position: center;
       background-repeat: no-repeat;
       background-attachment: scroll;
       margin: 0;
       padding: 0;
       font-family: Tahoma, Arial
     }

</style>

Sorry, I didn't give clearly my problem, am I? <style> body { background-image: url(http://takeinsocialmedia.com/wp-content/uploads/2014/04/norway-mountain-river-images-photos-0321205905.jpg); background-size: 100%; background-position: center; background-repeat: no-repeat; background-attachment: scroll; margin: 0; padding: 0; font-family: Tahoma, Arial } </style>

Star Light மூலமாக திருத்தப்பட்டது

iamjayakumars 489 தீர்வுகள் 5951 பதில்கள்
பதிவிடப்பட்டது

I checked, the problem with the image size.

I changed the image url and its worked fine, here for your reference


<style>

    body {

background-image:url(http://farm3.staticflickr.com/2509/4347593358_0f61b650bf_o.jpg);

      background-size: 100%;
      background-position: center;
      background-repeat: no-repeat;
      background-attachment: scroll;
      margin: 0;
      padding: 0;
      font-family: Tahoma, Arial
    }

</style>

I checked, the problem with the image size. I changed the image url and its worked fine, here for your reference <style> body { background-image:url(http://farm3.staticflickr.com/2509/4347593358_0f61b650bf_o.jpg); background-size: 100%; background-position: center; background-repeat: no-repeat; background-attachment: scroll; margin: 0; padding: 0; font-family: Tahoma, Arial } </style>
பதிவிடப்பட்டது

கேள்வியின் உரிமையாளர்

Oh, that's weird. You're right, right after I change the link it turn out working after few minutes. Thanks a lot :)

BTW, can I ask you once more question? It's about margin selector. Normally, if I put and "auto" value into "margin" it suppose to be center right? But in this code it won't (I never see this sintulation before)

<style>

     main {
       background: rgba(0,0,0,.4);
       position: absolute;
       margin: 20px auto;
       padding: 5px;
       width: 1000px
     }

</style>

Oh, that's weird. You're right, right after I change the link it turn out working after few minutes. Thanks a lot :) BTW, can I ask you once more question? It's about margin selector. Normally, if I put and "auto" value into "margin" it suppose to be center right? But in this code it won't (I never see this sintulation before) <style> main { background: rgba(0,0,0,.4); position: absolute; margin: 20px auto; padding: 5px; width: 1000px } </style>
iamjayakumars 489 தீர்வுகள் 5951 பதில்கள்
பதிவிடப்பட்டது

Welcome. You can ask "N" number of Questions.

Try with div. Even I can't figure it out the issue, but I'll get back to you ASAP. Sorry :(

Welcome. You can ask "N" number of Questions. Try with div. Even I can't figure it out the issue, but I'll get back to you ASAP. Sorry :(
cor-el
  • Top 10 Contributor
  • Moderator
17425 தீர்வுகள் 157456 பதில்கள்
பதிவிடப்பட்டது

See http://dorward.me.uk/www/centre/

You can reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.

  • Hold down the Shift key and left-click the Reload button
  • Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
  • Press "Command + Shift + R" (Mac)
See http://dorward.me.uk/www/centre/ You can reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files. *Hold down the Shift key and left-click the Reload button *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux) *Press "Command + Shift + R" (Mac)
பதிவிடப்பட்டது

கேள்வியின் உரிமையாளர்

@iamjayakumars: Thanks :) I will try it.

@cor-el: I don't think problem at cache. :)

@iamjayakumars: Thanks :) I will try it. @cor-el: I don't think problem at cache. :)

Star Light மூலமாக திருத்தப்பட்டது

iamjayakumars 489 தீர்வுகள் 5951 பதில்கள்
பதிவிடப்பட்டது

Could you try this Start Light

<style>

    main {
      background: rgba(0,0,0,.4);
    position: relative;
    display: block;
      margin: 20px auto;
      padding: 5px;
      width: 1000px
    }

</style>

Could you try this Start Light <style> main { background: rgba(0,0,0,.4); position: relative; display: block; margin: 20px auto; padding: 5px; width: 1000px } </style>
பதிவிடப்பட்டது

கேள்வியின் உரிமையாளர்

I had used your code and... It does working but... New problem has been appeared: https://www.facebook.com/photo.php?fbid=247657238751427

<main> tag should cover post (<article> tag) but it seem like... uhm, it isn't working as I expected. I also try change position for <article>, and here is problem: https://www.facebook.com/photo.php?fbid=247667368750414

I'm sorry for trouble you so much :'(

I had used your code and... It does working but... New problem has been appeared: https://www.facebook.com/photo.php?fbid=247657238751427 <main> tag should cover post (<article> tag) but it seem like... uhm, it isn't working as I expected. I also try change position for <article>, and here is problem: https://www.facebook.com/photo.php?fbid=247667368750414 I'm sorry for trouble you so much :'(