Jump to content

[SOLVED] Can't understand these lines


ballouta

Recommended Posts

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?

 

Link to comment
https://forums.phpfreaks.com/topic/128154-solved-cant-understand-these-lines/
Share on other sites

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;
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.