AllExperts > DHTML 
Search      
DHTML
Volunteer
Answers to thousands of questions
 Home · More DHTML Questions · Answer Library  · Encyclopedia ·
More DHTML Answers
Question Library

Ask a question about DHTML
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Andrew Hoffman
Expertise
I can field just about any question within this topic ranging from JavaScript to CSS, the two ingredients of DHTML. I`m very interested in the W3C and its validation rules for HTML, XHTML, and CSS, and enjoy answering questions of this type as well. I detest sleep and respond at all hours of the day or night.


Experience
Experience in the area
I've been working with DHTML and CSS for 7 years now and build/maintain websites of my own that implement DHTML navigation.

What I'm doing now
My contract with Microsoft has ended and I am working for myself once again. Please contact me for any front-end work at antibland@gmail.com

 
   

You are here:  Experts > Computing/Technology > HTML/XML > DHTML > style="border:none" and style="{border:none}"

DHTML - style="border:none" and style="{border:none}"


Expert: Andrew Hoffman - 1/29/2007

Question
Hi,

The following style is using the curly brace, is there different if I don't use the curly brace like style="{border:none}" ?
------------------
<td width="10%" style="border:none">welcome</td>
-------------------

Thanks,
lzzzz

Answer
I've never seen the curly notation for inline styling.  This is correct:

style="border:none"

However, you almost never want to use inline styling.  Better to use a class or a rule.  Say you want to remove the borders all <td>s inside of a table with an id of "table2".  You could write:

table#table2 td {
  border: none;
}

This is useful because you can touch that table's <td>s without touching any other <td>s on the page.  Also, the markup becomes simpler:

<td style="border:none">...</td>

becomes:

<td>...</td>


- Andrew

Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.