[css-d] width and percent

2007-08-09 Thread karuna sagar k
Hi,

{width: 60%} - here the width of the element is 60% of what ?
Also, does the answer to above hold good for margins and paddings ?

Thanks,
Karuna

   
-
 5, 50, 500, 5000 - Store unlimited mails in your inbox. Click here.
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


[css-d] navigation bar

2007-08-09 Thread karuna sagar k
Hi list,

I am facing problem in creating a page with a
navigation bar -

MARKUP:

div class=main_container
 div class=nav_bar
  psome content here/p
 /div
/div

STYLE:

.nav_bar
{
margin: 1%;
width: 15%;
background-color: grey;
height: 98%; // i tried 98% thinking 1%+1% margin
(top and bottom) accounted (also, is there a way to
have comments in CSS?)
}

.main_container
{
border: 1px solid black;
width: 100%;
height: 100%
}

Now, when this is rendered, the nav_bar shoots-out of
the containing div. So, what I noticed here is that
the properties width and height refer to the
content box of the element and calculated as x% of
width of parent element (is that right?).

So, is there a way for me to specify the values for
the above properties relatively (as percent) and keep
the nav_bar inside the containing div? - i.e. I want
the nav_bar to occupy whole left portion of the
screen, with a white space between the border of the
containing div.

Thanks for the replies,
Karuna


  Try the revolutionary next-gen Yahoo! Mail. Go to 
http://mrd.mail.yahoo.com/dc/landing
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/