Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.