HighDots Forums  

CSS question

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss CSS question in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mao
 
Posts: n/a

Default CSS question - 09-21-2007 , 03:21 AM






html,
body {
margin:0;
padding:0;
height:100%; /* 100 % height */
}

Above is a part of a CSS file I found in the Internet. I have been
searching in the Internet to find out what does the 1st line (html,)
mean. Can any one tell me what does it mean?

KC


Reply With Quote
  #2  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: CSS question - 09-21-2007 , 03:32 AM






Scripsit mao:

Quote:
html,
body {
margin:0;
padding:0;
height:100%; /* 100 % height */
}

Above is a part of a CSS file I found in the Internet.
It contains a most spectacular comment. It is potentially useful for
misleading people, if the actual CSS code is later changed and the comment
is not. :-)

Quote:
I have been
searching in the Internet to find out what does the 1st line (html,)
mean. Can any one tell me what does it mean?
It means that you need to read a primer, a tutorial, or a book on CSS now.
It's a matter of very basic constructs in CSS, so if you needed an
explanation, you need a crash course in CSS before trying to understand
other people's CSS code (which is often much more difficult and much less
useful than writing good CSS code of your own).

In CSS, you specify that some declarations are to be applied to some
elements by listing selectors that refer to elements, using a comma as a
separator. At the simplest, a selector is just an element's name, like html
or body. Thus

html, body { something }

is equivalent to

html { something }
body { something }

(and the line break is irrelevant: it is equivalent to a space in CSS).

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/



Reply With Quote
  #3  
Old   
dorayme
 
Posts: n/a

Default Re: CSS question - 09-21-2007 , 05:23 PM



In article <5jLIi.226289$PF4.135637 (AT) reader1 (DOT) news.saunalahti.fi>,
"Jukka K. Korpela" <jkorpela (AT) cs (DOT) tut.fi> wrote:

Quote:
Scripsit mao:

html,
body {
margin:0;
padding:0;
height:100%; /* 100 % height */
}

Above is a part of a CSS file I found in the Internet.

In CSS, you specify that some declarations are to be applied to some
elements by listing selectors
No, no... OP is wanting you to tell him about the html element.
It looks so strangely ephemeral.

--
dorayme


Reply With Quote
  #4  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: CSS question - 09-22-2007 , 02:04 AM



Scripsit dorayme:

Quote:
No, no... OP is wanting you to tell him about the html element.
Do you mean that OP does not know about HTML?

Quote:
It looks so strangely ephemeral.
I know what you mean, and I guess you know what I meant.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/


Reply With Quote
  #5  
Old   
mao
 
Posts: n/a

Default Re: CSS question - 09-25-2007 , 11:06 PM



On Sep 22, 6:23 am, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote:
Quote:
In article <5jLIi.226289$PF4.135... (AT) reader1 (DOT) news.saunalahti.fi>,
"Jukka K. Korpela" <jkorp... (AT) cs (DOT) tut.fi> wrote:

Scripsit mao:

html,
body {
margin:0;
padding:0;
height:100%; /* 100 % height */
}

Above is a part of aCSSfile I found in the Internet.

InCSS, you specify that some declarations are to be applied to some
elements by listing selectors

No, no... OP is wanting you to tell him about the html element.
It looks so strangely ephemeral.

--
dorayme
Hi every one,

Here is the place where I found the CSS codes.
http://www.456bereastreet.com/archiv...v2_fullheight/



Reply With Quote
  #6  
Old   
julian.bash
 
Posts: n/a

Default Re: CSS question - 09-26-2007 , 10:33 AM



On Sep 26, 6:06 am, mao <kc.at.sin... (AT) gmail (DOT) com> wrote:
Quote:
On Sep 22, 6:23 am, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote:

In article <5jLIi.226289$PF4.135... (AT) reader1 (DOT) news.saunalahti.fi>,
"Jukka K. Korpela" <jkorp... (AT) cs (DOT) tut.fi> wrote:

Scripsit mao:

html,
body {
margin:0;
padding:0;
height:100%; /* 100 % height */
}

Above is a part of aCSSfile I found in the Internet.

InCSS, you specify that some declarations are to be applied to some
elements by listing selectors

No, no... OP is wanting you to tell him about the html element.
It looks so strangely ephemeral.

--
dorayme

Hi every one,

Here is the place where I found the CSS codes.http://www.456bereastreet.com/archiv...v2_fullheight/
html, body { *rules* }. *rules* are applied to both the html and the
body-element.



Reply With Quote
  #7  
Old   
mao
 
Posts: n/a

Default Re: CSS question - 09-26-2007 , 10:31 PM



On Sep 26, 11:33 pm, "julian.bash" <misterio... (AT) googlemail (DOT) com> wrote:
Quote:
On Sep 26, 6:06 am, mao <kc.at.sin... (AT) gmail (DOT) com> wrote:





On Sep 22, 6:23 am, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote:

In article <5jLIi.226289$PF4.135... (AT) reader1 (DOT) news.saunalahti.fi>,
"Jukka K. Korpela" <jkorp... (AT) cs (DOT) tut.fi> wrote:

Scripsit mao:

html,
body {
margin:0;
padding:0;
height:100%; /* 100 % height */
}

Above is a part of aCSSfile I found in the Internet.

InCSS, you specify that some declarations are to be applied to some
elements by listing selectors

No, no... OP is wanting you to tell him about the html element.
It looks so strangely ephemeral.

--
dorayme

Hi every one,

Here is the place where I found theCSScodes.http://www.456bereastreet.com/archiv...v2_fullheight/

html, body { *rules* }. *rules* are applied to both the html and the
body-element.- Hide quoted text -

- Show quoted text -
Thanks for your reply.



Reply With Quote
  #8  
Old   
Gus Richter
 
Posts: n/a

Default Re: CSS question - 09-27-2007 , 01:09 AM



julian.bash wrote:
Quote:
On Sep 26, 6:06 am, mao <kc.at.sin... (AT) gmail (DOT) com> wrote:
On Sep 22, 6:23 am, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote:

In article <5jLIi.226289$PF4.135... (AT) reader1 (DOT) news.saunalahti.fi>,
"Jukka K. Korpela" <jkorp... (AT) cs (DOT) tut.fi> wrote:
Scripsit mao:
html,
body {
margin:0;
padding:0;
height:100%; /* 100 % height */
}
Above is a part of aCSSfile I found in the Internet.
InCSS, you specify that some declarations are to be applied to some
elements by listing selectors
No, no... OP is wanting you to tell him about the html element.
It looks so strangely ephemeral.
--
dorayme
Hi every one,

Here is the place where I found the CSS codes.http://www.456bereastreet.com/archiv...v2_fullheight/

html, body { *rules* }. *rules* are applied to both the html and the
body-element.
That should be: html, body { *declaration(s)* }
The whole thing is a *rule* (selector followed by a declaration block).
<http://www.w3.org/TR/CSS21/syndata.html#rule-sets>

Nothing wrong with what you were trying to say about grouping selectors.
Ref: <http://www.w3.org/TR/CSS21/selector.html#grouping>

--
Gus


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.