On Tue, Apr 19, 2011 at 11:33 AM, varai <[email protected]> wrote:
> Hi,
>
> I have
> #navbar {
>        margin: 0;
>        padding: 0;
>        height: 1em;
>        width:100%; }
> in nav_bar.css
>
> #navbar div comes under #header div from cake.generic.css, so #navbar
> div should inherit the properties of #header div.
> #header{
>        width:100%;
> }
>
> So, how do I link nav_bar.css and cake.generic.css so that #navbar
> inherits all the properties of #header?

Are you asking how to load the CSS file?
echo $this->Html->css('nav_bar', 'stylesheet', array('media'=>'screen,
projection'));

Or are you asking a purely CSS question? When you say that #navbar
comes "under" #header, do you mean that it comes after it in the
source, or is *inside* #header? Because the styles only cascade for
elements inside one another, not just if the one block comes after
another.

Keep in mind, though, that not all rules are inherited for block
elements (where one is inside the other). Things like width, margin,
padding, etc.

But it seems a moot point as both elements have explicit width: 100%
rules, anyway.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to