By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,702 Members | 1,771 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,702 IT Pros & Developers. It's quick & easy.

background css property for body selector

P: 64
hi

are css background properties that are set for body element considered for html selector when there are's any css background properties for html selector? or body element is an exception that for it background-image is inserted into margin area?


(i ask this question because background-image is not inserted to box of the element for ordinary element , however for body element when there are'nt any background style for that,this event occur)

thanks alot for your help.
Jun 4 '11 #1
Share this Question
Share on Google+
3 Replies


P: 64
I think i find my answer
there is an exception for inherit css property and that is css property ascend from body element to html element but there is another problem an it's background property is not inherited at all
is that right?
Jun 4 '11 #2

Dormilich
Expert Mod 5K+
P: 8,639
CSS properties are not inherited by default, you have to assign that by the inherit keyword (where valid).
Jun 5 '11 #3

P: 64
ok, you're right but when i use for example below css
Expand|Select|Wrap|Line Numbers
  1. body {
  2. background: blue url('snow.jpg') no-repeat fixed;
  3. }
  4.  
i watch this property affected based on window browser even without i say nothing about html , is it possible that there is default settings for browsers and that's caused that?
thanks alot
Jun 5 '11 #4

Post your reply

Sign in to post your reply or Sign up for a free account.