Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Weird Sidebar Issue

Go to End

3 Posts   1157 Views


Community Member, 108 Posts

27 April 2009 at 9:45pm

I have a site that has a max of 3 menu levels

In my I have the following code which does not work. I"m pulling my hair. I've had my sidebar working perfectly even showing the 3 menu levels and something happened. I did a dev/build and now it's all tweaked.

Here's the weird part. When I click on any menu(1) item the submenu does not show up, but it shows up for another menu(1) item above it.

<ul id="menu">
<% control Menu(1) %> <!-- Level I -->
<li class="m$ID"><a href="$Link" target="_self" class="a$ID">$MenuTitle.XML</a>
<% if LinkOrCurrent = current %>
<% control Children %>
<ul id="smenu">
<li class="sm$ID"><a href="$Link" title="Go to the $Title.XML page" class="sa$ID">$MenuTitle</a></li>
<% end_control %>
<% end_if %>
<% end_control %>

Can you help. This is really strange and I'm going crazy.




Community Member, 108 Posts

27 April 2009 at 10:30pm

Okay, I figured it out. Talked about having your *rear* handed to you by a computer. Oh man! What a weekend.

Here's the big deal. You have to close the <li> with a </li> before you go off and start another <ul> or the children.

Maybe I should take computer 101 again in school. I got smacked down. But it now works like a charm and I can get on with life.



Community Member, 1 Post

13 June 2011 at 7:45am

The CSS is: http:// w

Basically I want the sidebar (blue div), to line up on the side as it is but up flush against the top as you would expect a floated content area with a floated sidebar next to it. If I take out the #sidebar in the css it DOES align right up at the top as I want it to. The minute you as a float:left or width or anything it jumps down to the end of the #masthead div and beginning of the #content div. Im pretty sure I have everything lined up correctly I just cant figure out why this is doing that.
First of all, you're using an incomplete doctype, so browsers are rendering the page in quirks mode, which is a bad thing. You should use a complete doctype (one that includes a URL) to get browsers to render as close to the same as possible. I recommend HTML 4.01 Strict. A doctype is not a magic fix. It is the first step in the process of fixing your page.
Activating the Right Layout Mode Using the Doctype Declaration
Fix Your Site With the Right DOCTYPE!
Choosing a DOCTYPE
Doctype switching
Rendering Mode and Doctype Switching

2) Actually the stylesheet is

3) <br /> is not valid HTML. It's XHTML. You should remove the " /" from the end of all start tags for elements that are not allowed to have an end tag in HTML, e.g. <meta>, <link>, <img>, and <br>.

4) Check out this article and this demo from it.

5) Don't forget to make sure that the (X)HTML and CSS code you write is valid.


Computer Repairs Brisbane