On 17/06/2011 3:50 AM, Peter Bradley wrote:
Ar 16/06/11 17:35, ysgrifennodd David Hucklesby:
In your style-sheets, you have these "Layout" triggers that affect
#site-title -

style.css line 12:
* {
zoom: 1.0;
}

style.css line 21:
#site-title {
width: 500px;
}

style-1.css line 341:
#site-title {
float: left;
width: 700px;
}

You also have "hasLayout" on the enclosing #branding:
#access .menu-header,
div.menu,
#colophon,
#branding, /* <- here */
#main,
#wrapper {
width: 940px;
}

Getting rid of all those triggers fixes it this end.


Thanks David,

First the good news. Your solution works, as you know it does, as you
can see if you visit http://www.stellawhitelaw.co.uk

I have a bit of a problem with it, though. I can get rid of the triggers
in the CSS file you've called style.css with no problem (in fact I
probably should have do so before), but those in style-1.css are not
strictly speaking accessible to me. The reason is that I'm developing a
WordPress child theme, so I import the parent stylesheet (@import) and
then do whatever I need to in my child theme to make it work. The last
two triggers you give above are in the parent stylesheet.

Now, OK, I can alter the parent stylesheet; but it comes with a risk. A
future update to the parent might put the triggers back and break the
layout. So is there a way I can prevent HasLayout being triggered
without messing with the parent stylesheet?


Yes, override them with specificity in style.css.

div#site-title {
    float: none;
    width: auto;
}
div#branding {
    width: auto;
}


As for being a glutton for punishment, I'm not sure why you think that,
but I'll take it as a compliment.

:-)


I guess you don't quite understand hasLayout. It's like mixing the poison and the antidote together. May I suggest to you that you read this.

http://www.satzansatz.de/cssd/onhavinglayout.html


You could make the changes in the parent stylesheet and insert this.

 /* WARNING, beware of the hasLayout genie.
    http://www.satzansatz.de/cssd/onhavinglayout.html */



--
Alan Gresley
http://css-3d.org/
http://css-class.com/
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to