1
rossb
Left (menu) block, split <{$block.content}> items to separate lines?
  • 2012/1/19 23:46

  • rossb

  • Just popping in

  • Posts: 77

  • Since: 2006/8/28


Greetings;

My theme left block loop is thus:


<{foreach item=block from=$xoops_lblocks}>
"><{$block.title}>

<{$block.content}>



<{/foreach}>

resulting in menu links all on one line, wrapping within css determined box:

Administration Menu View Account Edit Account Notifications Inbox Logout

I would like to render:

Administration Menu

View Account

Edit

Account

Notifications

Inbox

Logout


..or some other method to split to one link per line.

Ideas?

Thanks;
Bill




2
jcweb
Re: Left (menu) block, split <{$block.content}> items to separate lines?
  • 2012/1/20 8:44

  • jcweb

  • Quite a regular

  • Posts: 253

  • Since: 2005/4/25


Look in the css file if there at mainmenu an #td in front. If yes, delete the #td and take a look at the website. You should look now in every block in the css files for the #td ...

Did you use a 3rd party theme?

Greets

3
playsome
Re: Left (menu) block, split <{$block.content}> items to separate lines?
  • 2012/1/20 10:00

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


If this is the user menu you want to display one link on a line, the usermenu template should have an id attribute so the answer lieas in the css file of the theme.

You probably need something like this:

#usermenu a {background-color: transparent; display: block; margin: 0; padding: 2px; font-weight : normal; color:#181818;}


the display:block property is what you need to achieve your desired result.

To show you what i mean heres 2 screenshots

Resized Image

no display:block

Resized Image

has display:block

is this what your trying to achieve?

4
rossb
Re: Left (menu) block, split <{$block.content}> items to separate lines?
  • 2012/1/20 16:08

  • rossb

  • Just popping in

  • Posts: 77

  • Since: 2006/8/28


Thanks playsome!

that is all it took.

from:

/* in main.css */
td#leftcolumn a
{
color: #FFFFFF;
font-weight: normal;
}

to:

/* Override, later included css file */
td#leftcolumn a
{
width: inherit;
padding-left: 10px;
color: #FFFFFF;
font-weight: normal;
display: block;
}

The width: inherit was necessary to prevent left column width from returning to defaults.

5
Valadorn
Re: Left (menu) block, split <{$block.content}> items to separate lines?
  • 2012/1/24 5:36

  • Valadorn

  • Just popping in

  • Posts: 3

  • Since: 2012/1/24


I'm having the same problem and I have tried what you said to do here and neither have worked was wondering if you would take a look at the code and tell me what is going on.


HTML:

    <
td class="leftCell">
      
      <{foreach 
item=block from=$xoops_lblocks}>
        <
table class="menuCell center" cellpadding="0" cellspacing="0">
          <
tr>
              <
td class="cellMenuBarTopLeft">td>
            <
td class="cellMenuBarTopMiddle">td>
            <
td class="cellMenuBarTopRight">td>
          tr>
          <
tr>
            <
td class="cellMenuBarMiddleLeft">&nbsp;td>
            <
td align="center" class="cellMenuBarMiddle">
              <
table width="170" border="0">
                <
tr>
                  <
td class="menuBlockTitle"><{$block.title}>td>
                tr>
                <
tr>
                  <
td class="menuBlockContent"><{$block.content}>td>
                tr>
              table>    
            td>
            <
td class="cellMenuBarMiddleRight">&nbsp;td>
          tr>
          <
tr>
            <
td class="cellMenuBarBottomLeft">td>
            <
td class="cellMenuBarBottom">td>
            <
td class="cellMenuBarBottomRight">td>
          tr>
        table>
        <
table>
          <
tr>
            <
td>&nbsp;td>
          tr>
        table>
      <{/foreach}>
    td>


CSS:
td.leftCell {
    
width:200px !important;
    
vertical-align:top;
}

td.menuBlockTitle {
    
color#ffffff;
    
font-weightbold;
    
text-align:left;
    
font-size:11px;    
    
padding-left:40px !important;
    
vertical-align:middle;
    
background-image:url(images/leftcol_bl_title2.gif);
    
background-position:center;
    
height34px;
    
width140px;    
    
background-repeatno-repeat;
}

td.menuBlockContent {
    
color:#e7e7e7;
    
text-align:left;
    
font-size:11px;
    
padding-left:10px;
}

6
playsome
Re: Left (menu) block, split <{$block.content}> items to separate lines?
  • 2012/1/24 22:42

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


I cant tell from your code where the menu would be, there is no menu code.

look at your source code or use firebug for firefox and locate the menu code which will be tags, find the containing element i.e div class="mainMenu"

and in css put something like

.mainMenu a
{
display:block;
}

you'll need other css properties in their aswell.

or...post a link to your site and i'll take a look.

7
Valadorn
Re: Left (menu) block, split <{$block.content}> items to separate lines?
  • 2012/1/24 22:55

  • Valadorn

  • Just popping in

  • Posts: 3

  • Since: 2012/1/24



8
playsome
Re: Left (menu) block, split <{$block.content}> items to separate lines?
  • 2012/1/24 23:42

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


In your theme css file (http://www.havenswatch.com/themes/wow2/style.css)

add this rule

#mainmenu a
{
display:block;
}

and you should be good to go.

9
Valadorn
Re: Left (menu) block, split <{$block.content}> items to separate lines?
  • 2012/1/25 4:04

  • Valadorn

  • Just popping in

  • Posts: 3

  • Since: 2012/1/24


I was trying to add the display: block; inside the individual blocks code and it wasn't working. I understand it now lol thanks for the help man.

Login

Who's Online

325 user(s) are online (209 user(s) are browsing Support Forums)


Members: 0


Guests: 325


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits