View Single Post

  #4 (permalink)  
Old 19-01-2007, 03:23 PM
uncleseanie uncleseanie is offline
Frontpage User
 
Join Date: Dec 2006
Location: dublin, ireland
Posts: 23
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
uncleseanie will become famous soon enough
Default

Quote:
Originally Posted by louie View Post
did you try giving the nested div a class?

Code:
<style type="text/css">
.main{border:1px solid #cccccc; width:500px; padding:5px;}
.sec{border:1px dashed #000000;}
</style>
 
<div class="main"> main div
 <div class="sec">
 nested div
 </div>
</div>
in the above example "sec" will inherit the width and padding properties.
so if you want to change the width then you will to explicitly state it
in .sec
Reply With Quote