ballouta Posted October 13, 2008 Share Posted October 13, 2008 Hello I have an empty html page with this a link to style.css file in the header. and this code in the body tag: <body> <div class="main" id="page1"> </div> </body> the css file contains only these two lines: *{padding:0; margin:0;} body{ padding:0; margin:0; text-align:center; vertical-align:top; background:url(images/tall.gif) repeat-x top #414141;font-family:Arial, Helvetica, sans-serif; font-size:12px; line-height:14px; color:#333333;} the tall.gif is in the images folder. 1) How does this work and the css files doesn't contain anything called 'class main'? 2) is this true: the 414141 is the background color and this tall.gif is repeated at the top of this page? Quote Link to comment https://forums.phpfreaks.com/topic/128154-solved-cant-understand-these-lines/ Share on other sites More sharing options...
Zane Posted October 13, 2008 Share Posted October 13, 2008 why would it have a class main? and 2: yes if you were to actually space it out in a "proper" format then it would be easier to read *{ padding:0; margin:0; } body{ padding:0; margin:0; text-align:center; vertical-align:top; background:url(images/tall.gif) repeat-x top #414141; font-family:Arial, Helvetica, sans-serif; font-size:12px; line-height:14px; color:#333333; } and technically you don't need these body{ padding:0; margin:0; ..... ..... .... since you already have this * { padding:0; margin:0; } Quote Link to comment https://forums.phpfreaks.com/topic/128154-solved-cant-understand-these-lines/#findComment-663760 Share on other sites More sharing options...
ballouta Posted October 13, 2008 Author Share Posted October 13, 2008 Thank you I will read well this code and understand it Quote Link to comment https://forums.phpfreaks.com/topic/128154-solved-cant-understand-these-lines/#findComment-663813 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.