Connecting Tech Pros Worldwide Help | Site Map

css syntax

 
LinkBack Thread Tools Search this Thread
  #1  
Old February 10th, 2006, 09:55 AM
sam
Guest
 
Posts: n/a
Default css syntax

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, 10:45 AM
impaler
Guest
 
Posts: n/a
Default 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, 06:25 PM
Thomas 'PointedEars' Lahn
Guest
 
Posts: n/a
Default 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, 05:35 PM
Dr John Stockton
Guest
 
Posts: n/a
Default 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, 06:05 PM
Thomas 'PointedEars' Lahn
Guest
 
Posts: n/a
Default 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, 06:25 PM
John Bokma
Guest
 
Posts: n/a
Default 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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.