Error when using CSS selector
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>
由cor-el于
所有回复 (9)
Hi, Try like this
- background-image: url(http://thisisanimage.jpg);
More to know about Thimble CSS Cheat Sheet
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于
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>
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 :(
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. :)
由Star Light于
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 :'(