Connecting Tech Pros Worldwide Help | Site Map

css syntax

  #1  
Old February 10th, 2006, 10:55 AM
sam
Guest
 
Posts: n/a
Hi,

Does anyone know why there is a hash (#) in front of each css style?
please see the following example:

<style type="text/css">
#leftcolumn{
float:left;
width:150px;
height: 400px;
border: 3px solid black;
padding: 5px;
padding-left: 8px;

}

#leftcolumn a{
padding: 3px 1px;
display: block;
width: 100%;
text-decoration: none;
font-weight: bold;
border-bottom: 1px solid gray;
}

#leftcolumn a:hover{
background-color: #FFFF80;
}

#rightcolumn{
float:left;
width:550px;
min-height: 400px;
border: 3px solid black;
margin-left: 10px;
padding: 5px;
padding-bottom: 8px;
}

* html #rightcolumn{ /*IE only style*/
height: 400px;
}
</style>

It should be without hash, I usually use the following css syntax:

body{ background-color: black }
p { color: blue; }
h3{ color: white; }


Thanks
Sam
  #2  
Old February 10th, 2006, 11:45 AM
impaler
Guest
 
Posts: n/a

re: css syntax



sam wrote:[color=blue]
> Hi,
>
> Does anyone know why there is a hash (#) in front of each css style?
> please see the following example:
>
> <style type="text/css">
> #leftcolumn{
> float:left;
> width:150px;
> height: 400px;
> border: 3px solid black;
> padding: 5px;
> padding-left: 8px;
>
> }
>
> #leftcolumn a{
> padding: 3px 1px;
> display: block;
> width: 100%;
> text-decoration: none;
> font-weight: bold;
> border-bottom: 1px solid gray;
> }
>
> #leftcolumn a:hover{
> background-color: #FFFF80;
> }
>
> #rightcolumn{
> float:left;
> width:550px;
> min-height: 400px;
> border: 3px solid black;
> margin-left: 10px;
> padding: 5px;
> padding-bottom: 8px;
> }
>
> * html #rightcolumn{ /*IE only style*/
> height: 400px;
> }
> </style>
>
> It should be without hash, I usually use the following css syntax:
>
> body{ background-color: black }
> p { color: blue; }
> h3{ color: white; }
>
>
> Thanks
> Sam[/color]


it aplies to the element having its id "leftcolumn"

ex:
<td id="leftcolumn"></td>
<td id="rightcolumn"></td>
it will apply the according css

this was an offtopic, it's a javascript group, please don't misspost
anymore

  #3  
Old February 10th, 2006, 07:25 PM
Thomas 'PointedEars' Lahn
Guest
 
Posts: n/a

re: css syntax


sam wrote:
[color=blue]
> Does anyone know why there is a hash (#) in front of each css style?[/color]

Wrong newsgroup.
  #4  
Old February 11th, 2006, 06:35 PM
Dr John Stockton
Guest
 
Posts: n/a

re: css syntax


JRS: In article <2469222.vxSaSxp1AB@PointedEars.de>, dated Fri, 10 Feb
2006 20:10:45 remote, seen in news:comp.lang.javascript, Thomas
'PointedEars' Lahn <PointedEars@web.de> posted :[color=blue]
>sam wrote:
>[color=green]
>> Does anyone know why there is a hash (#) in front of each css style?[/color]
>
>Wrong newsgroup.[/color]

He had already been told that, but in a polite and constructive manner.

Don't post unless you have a useful contribution to make, and see
whether a psychiatrist can do anything about your Himmler complex.

--
© John Stockton, Surrey, UK. ???@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Check boilerplate spelling -- error is a public sign of incompetence.
Never fully trust an article from a poster who gives no full real name.
  #5  
Old February 11th, 2006, 07:05 PM
Thomas 'PointedEars' Lahn
Guest
 
Posts: n/a

re: css syntax


Dr John Stockton wrote:
[color=blue]
> [...] see whether a psychiatrist can do anything about your Himmler
> complex.[/color]

Godwin's Law. You lose.
  #6  
Old February 11th, 2006, 07:25 PM
John Bokma
Guest
 
Posts: n/a

re: css syntax


Thomas 'PointedEars' Lahn <PointedEars@web.de> wrote:
[color=blue]
> Dr John Stockton wrote:
>[color=green]
>> [...] see whether a psychiatrist can do anything about your Himmler
>> complex.[/color]
>
> Godwin's Law. You lose.[/color]

Godwin never said a thing about losing, get it right.

--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
css syntax sam answers 1 February 10th, 2006 10:25 PM
CSS Syntax for element "X" followed by element "Y" ? Jamie Jackson answers 4 July 20th, 2005 11:38 PM
Color properties on columns is valid CSS syntax ? Timothy Madden answers 5 July 20th, 2005 10:49 PM
CSS syntax help Henry answers 16 July 20th, 2005 09:01 PM