Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello
I written css code in a page. In this I have a table control in div I want to that css use only for this div not entire page.

css code following

CSS
<style type="text/css"">
 img, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video
       {
           margin: 0;
           padding: 0;
           border: 0;
           outline: 0;
           font-size: 100%;
           vertical-align: baseline;
           background: transparent;
       }
</style>
Posted
Updated 19-Feb-13 21:58pm
v2
Comments
vyas_pratik20 20-Feb-13 3:42am    
replace img, ol, ... with body tag

surround the table with a div tag and name that div to a class or id like
and access that test class in css
 
Share this answer
 
this way...
if your div have class='div1' then

style ...
CSS
.div1 img,.div1 ol,.div1 ul.......{...}

Happy Coding!
:)
 
Share this answer
 
v2

you can use Class Selector or ID Selector like....
CSS
<style type="text/css"">
div.Mydiv
{
           margin: 0;
           padding: 0;
           border: 0;
           outline: 0;
           font-size: 100%;
           vertical-align: baseline;
           background: transparent;
       }

</style>
here Mydiv is class attribute of your div............
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900