You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by rzechner <ze...@liland.at> on 2008/04/03 09:43:10 UTC

Modifying inline CSS in head of document

I want to resize the height of my pages dynamically, therefore I need to 
set the height of some markup elements dynamically. I don't want to use 
Javascript (although I found a nice solution with jquery).
Is there a way to add a textblock like the following to the page header?

<!--[if lt IE 8]>
   <style type="text/css">
       #leftmenu{height:400px;} /*this value should is dynamic */
   </style>
<![endif]-->

whereas the height of #leftmenu is set like this:

public abstract BasePage extends WebPage() {
...
WebClientInfo w = (WebClientInfo)getWebRequestCycle().getClientInfo();
ClientProperties cp = w.getProperties();
int minHeight = cp.getBrowserHeight();
//some imagination now
addToHeader{
       addStyle("#leftmenu", "height", minHeight);
}


Thanks,

Roman




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Modifying inline CSS in head of document

Posted by Igor Vaynberg <ig...@gmail.com>.
see IHeaderContributor

-igor

On Thu, Apr 3, 2008 at 12:43 AM, rzechner <ze...@liland.at> wrote:
> I want to resize the height of my pages dynamically, therefore I need to set
> the height of some markup elements dynamically. I don't want to use
> Javascript (although I found a nice solution with jquery).
>  Is there a way to add a textblock like the following to the page header?
>
>  <!--[if lt IE 8]>
>   <style type="text/css">
>       #leftmenu{height:400px;} /*this value should is dynamic */
>   </style>
>  <![endif]-->
>
>  whereas the height of #leftmenu is set like this:
>
>  public abstract BasePage extends WebPage() {
>  ...
>  WebClientInfo w = (WebClientInfo)getWebRequestCycle().getClientInfo();
>  ClientProperties cp = w.getProperties();
>  int minHeight = cp.getBrowserHeight();
>  //some imagination now
>  addToHeader{
>       addStyle("#leftmenu", "height", minHeight);
>  }
>
>
>  Thanks,
>
>  Roman
>
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>  For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org