resize my windows my menu move on the top

72 views
Skip to first unread message

stan...@yahoo.fr

unread,
Jul 13, 2011, 10:10:08 AM7/13/11
to SiteMesh 3 Users
Hi people
i have a problem wih organisation about my windows

on the left i have my menu i put code menu on my decorator page.
Its working good if the windows display on the normal size but when
you resize the windows my menu is on the top
how to stabilize this menu :/

i put my code :
my decorator page

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<%@ taglib prefix="menu" uri="http://struts-menu.sf.net/tag-el"%>

<html>
<head>
<title>SiteMesh example: <sitemesh:write property='title'/></
title>

<sitemesh:write property='head' width="30%" height="100%"/>
</head>
<body>

<h1 class='title'>SiteMesh example site: <sitemesh:write
property='title'/></h1>
<div>
<div id="menu" class="menu">
<menu:useMenuDisplayer name="TabbedMenu"
>
<menu:displayMenu name="Global.Home" />
<menu:displayMenu name="Global.About" />
</menu:useMenuDisplayer>
</div>
<div class='mainBody'>
<sitemesh:write property='body'/>
</div>
</div>
<div class='disclaimer'>Site disclaimer. This is an example.</div>

</body>
</html>


my page
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<%@ taglib uri="http://struts-menu.sf.net/tag" prefix="menu" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://
www.w3.org/TR/html4/loose.dtd">
<html>
<head><sx:head parseContent="true"/> <link rel="stylesheet" type="text/
css" href="style.css">

<title><s:text name="Global.time"/></title>

</head>
<body>


<s:div id="body" >
<table border="1" width="100%">
<tr>
<td width="100%">



<b><s:text name="tabdate"/></b><br><br>

<sx:tabbedpanel id="test" cssClass="toto"
disabledTabCssClass="cssClass">

<sx:div id="one" label="%{getText('nameofday')}"
highlightColor="color:orange" labelposition="top" cssClass="toto"
cssStyle="toto" >

1-<s:text name="Sunday"/><br> 2-<s:text name="Monday"/><br> 3-<s:text
name="Tuesday"/><br> 4-<s:text name="Wenesday"/><br>

5-<s:text name="Thursday"/><br> 6-<s:text name="Friday"/><br> 7-
<s:text name="Saturday"/>

</sx:div>

<sx:div id="two" label="%{getText('nameofmonth')}" >

1-<s:text name="January"/><br> 2-<s:text name="February"/><br> 3-
<s:text name="March"/><br> 4-<s:text name="April"/><br> 5-<s:text
name="May"/><br>

6-<s:text name="June"/><br> 7-<s:text name="July"/><br> 8-<s:text
name="August"/><br> 10-<s:text name="September"/><br>12-<s:text
name="December"/><br>

</sx:div>

<sx:div id="three" label="%{getText('nameofcity')}" >

1-PARIS<br> 2-MARSEILLE<br> 3-LILLE<br> 4-AJACCIO </sx:div>

</sx:tabbedpanel>

</td>
</tr>
</table>
<sx:tree id="books" label="Books" title="test" >

<sx:treenode label="Programing books" title="test" >

<sx:treenode label="Java" title="test" >

<sx:treenode id="Thread-Books" label="Core-Java" >

<sx:treenode id="Thread-Books" label="Java in Action" />

<sx:treenode id="Thread-Books" label="Core-Java Essentials" />

<sx:treenode id="Thread-Books" label="Head first Java" />

<sx:treenode id="Thread-Books" label="Multi-threading" />

<sx:treenode id="Thread-Books" label="Networking" />

</sx:treenode>

<sx:treenode label="J2EE" title="test1">

<sx:treenode id="Thread-Books" label="JSP in Action" />

<sx:treenode id="Thread-Books" label="Core-JSP-Servlet" />

<sx:treenode id="Thread-Books" label="Advance JSP-Servlet" />

</sx:treenode>

</sx:treenode>

</sx:treenode>

<sx:treenode label="Technical" >

<sx:treenode label="Science books"></sx:treenode>

</sx:treenode>

</sx:tree>
</s:div>


</body>
</html>

Joe Walnes

unread,
Jul 17, 2011, 9:07:23 PM7/17/11
to sitemes...@googlegroups.com
Hi Stanilas

I'm afraid it's unlikely that anyone on this list will be able to shed much light. It seems you are struggling with the layout of the struts-dojo library - you may have better luck asking the list behind that.

max max

unread,
Jul 18, 2011, 10:44:52 AM7/18/11
to sitemes...@googlegroups.com
why you talk about dojo its not dojo problem 
its sitemesh problem bevause i my menu move when i resize my window.
if you want i erase dojo tag i not use it on my page .

--- En date de : Lun 18.7.11, Joe Walnes <j...@walnes.com> a écrit :

Joe Walnes

unread,
Jul 18, 2011, 12:21:20 PM7/18/11
to sitemes...@googlegroups.com
I'm sorry, I'm not understanding the problem. Please could you reduce it down to the least amount of code that demonstrates the problem and deploy it somewhere so we can better understand.

max max

unread,
Jul 18, 2011, 12:37:33 PM7/18/11
to sitemes...@googlegroups.com


Hi Stanilas

<html>
 <head>
   <title>SiteMesh example: <sitemesh:write property='title'/></
title>

   <sitemesh:write property='head' width="30%" height="100%"/>
 </head>
 <body>

    
<div>
<div id="menu" class="menu">
<menu:useMenuDisplayer name="TabbedMenu"
 >
 <menu:displayMenu name="Global.Home" />
 <menu:displayMenu name="Global.About" />
</menu:useMenuDisplayer>
</div>
   <div class='mainBody'>
     <sitemesh:write property='body'/>
   </div>
 </body>
</html>


my page

<html>


<body>


<s:div id="body" >
<table border="1" width="100%">
   <tr>
   <td width="100%">


<sx:tabbedpanel id="test" cssClass="toto"
disabledTabCssClass="cssClass">
</sx:tabbedpanel>
</td>
   </tr>
 </table>
   
</s:div>


</body>
</html>
my decorator page



<html>

 
 <body>

   <h1 class='title'>SiteMesh example site: <sitemesh:write
property='title'/></h1>
<div>
<div id="menu" class="menu">
<menu:useMenuDisplayer name="TabbedMenu"
 >
 <menu:displayMenu name="Global.Home" />
 <menu:displayMenu name="Global.About" />
</menu:useMenuDisplayer>
</div>
   <div class='mainBody'>
     <sitemesh:write property='body'/>
   </div>
</div>
   <div class='disclaimer'>Site disclaimer. This is an example.</div>

 </body>
</html>


my page

<html>


</head>
<body>


<s:div id="body" >
<table border="1" width="100%">
   <tr>
   <td width="100%">



<b><s:text name="tabdate"/></b><br><br>

<sx:tabbedpanel id="test" cssClass="toto"
disabledTabCssClass="cssClass">
</sx:tabbedpanel>

    </td>
   </tr>
 </table>
 
</s:div>


</body>
</html>


max max

unread,
Jul 18, 2011, 12:47:23 PM7/18/11
to sitemes...@googlegroups.com
sorry my yahoo mail have a little window and i cannot see anything.

i clean my code 

my decorator page:

<html>
 <head>
   <sitemesh:write property='head' width="30%" height="100%"/>
 </head>
 <body>

    
<div>
<div id="menu" class="menu">
<menu:useMenuDisplayer name="TabbedMenu">
 <menu:displayMenu name="Global.Home" />
 <menu:displayMenu name="Global.About" />
</menu:useMenuDisplayer>
</div>
   <div class='mainBody'>
     <sitemesh:write property='body'/>
   </div>
 </body>
</html>


my page i want to decorate:


<html>

<body>
<s:div id="body" >
<table border="1" width="100%">
   <tr>
   <td width="100%">
<sx:tabbedpanel id="test" cssClass="toto"
disabledTabCssClass="cssClass">
</sx:tabbedpanel>
</td>
   </tr>
 </table>
</s:div>
</body>
</html>

--- En date de : Lun 18.7.11, max max <stan...@yahoo.fr> a écrit :

max max

unread,
Jul 18, 2011, 12:53:23 PM7/18/11
to sitemes...@googlegroups.com
well the problem is my menu move when i reduce my windows.that mean my menu is on the top to my tabMenu.
i want always my menu on the left whatever the windows size.

Colin Harrington

unread,
Jul 18, 2011, 12:57:29 PM7/18/11
to sitemes...@googlegroups.com
What does the resulting HTML from the server look like?

Colin Harrington
colin.ha...@gmail.com

Joe Walnes

unread,
Jul 18, 2011, 12:59:14 PM7/18/11
to sitemes...@googlegroups.com
Can you include complete working code, so we can try it ourselves. 

max max

unread,
Jul 18, 2011, 2:56:18 PM7/18/11
to sitemes...@googlegroups.com
my work is too big for my mail upload <25MO for yahoo
graznd.bmp
reduced.bmp

Matt Ruby

unread,
Jul 18, 2011, 2:59:36 PM7/18/11
to sitemes...@googlegroups.com
I think you're having some style issues.   I'm assuming that your tabs are floated to the left.  This doesn't look like a sitemesh issue. 
-Ruby
--
-Matt Ruby-
matt...@gmail.com

max max

unread,
Jul 18, 2011, 3:37:10 PM7/18/11
to sitemes...@googlegroups.com
maybe because i put % instead of px 

--- En date de : Lun 18.7.11, Matt Ruby <matt...@gmail.com> a écrit :

Matt Ruby

unread,
Jul 18, 2011, 3:42:02 PM7/18/11
to sitemes...@googlegroups.com
If you could post the resulting html, css and js up somewhere, I'm sure I can help.  However, this is not a sitemesh issue.
You could start by giving your #menu a set width like: min-width: 400px 

-Ruby  
--
-Matt Ruby-
matt...@gmail.com

Colin Harrington

unread,
Jul 18, 2011, 3:44:48 PM7/18/11
to sitemes...@googlegroups.com
This definitely looks like a styling issue. 

You may want to search around for "Responsive Design" or Media Queries to handle browser resizing bettter, but I don't think that this list is the right venue for CSS issues.

Happy Trails,

Colin Harrington
colin.ha...@gmail.com

max max

unread,
Jul 18, 2011, 3:50:41 PM7/18/11
to sitemes...@googlegroups.com
yeah i think its that

--- En date de : Lun 18.7.11, Colin Harrington <colin.ha...@gmail.com> a écrit :
decorator.jsp
page2.jsp

Joe Walnes

unread,
Jul 18, 2011, 4:41:38 PM7/18/11
to sitemes...@googlegroups.com
I noticed you have: <sitemesh:write property='head' width="30%" height="100%"/> in your decorator. The sitemesh:write tag does not use width/height attributes - they will be ignored. I'm not sure what you're trying to do with them.

max max

unread,
Jul 18, 2011, 4:58:00 PM7/18/11
to sitemes...@googlegroups.com
i just want my menu on the left and i success it but when i resize my windows the menu go to the top an another 
decorator.bmp

Joe Walnes

unread,
Jul 18, 2011, 6:23:48 PM7/18/11
to sitemes...@googlegroups.com
I recommend reading this (excellent) article on CSS positioning:
http://www.alistapart.com/articles/css-positioning-101/

max max

unread,
Jul 18, 2011, 6:43:51 PM7/18/11
to sitemes...@googlegroups.com

joe i will read your artivles
rx people for help :)

--- En date de : Mar 19.7.11, Joe Walnes <j...@walnes.com> a écrit :

Reply all
Reply to author
Forward
0 new messages