Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Montreal, Canada

    CSS problems // drupal

    So I'm editing a drupal template to fit my website.

    General template is done, everything looks like I'd want.
    The only problem is with the damn menu bar.

    Allright, let's begin by describing the problem.

    Well, the left column is called #sidebar
    in it different blocks are assigned a div id. example:

    HTML Code:
    <div id="sidebar">
    <div class="block block-user" id="block-user-1">
    <h2 class="title">Blocks's Title</h2>
    <div class="content">Blocks's Content</div>
    <div class="block block-settings" id="block-settings-1">
    <h2 class="title">Blocks's Title</h2>
    <div class="content">Blocks's Content</div>

    Here are some bits of my css:

    #sidebar {
    	margin-top: -30px;
    	padding-top: 15px;
    	padding-right: 0px;
    	padding-left: 20px;
    	float: left;	
    #sidebar_bottom {
    	width: 250px;
    	margin-left: -20px;

    So as we see, the whole menu has a background of menubg.gif, and we have a picture blockbottom.gif at the end of the menu.

    And all the blocks (text) are contained in that.

    Now what I'd like to do, is add this blockbottom.gif picture below each block. Sort of to divide it visually.

    I've tried everything I though would work. And well, nop. won't work.

    Basically I want to have #sidebar_bottom's content below each block.

    Here's a list of what I tried

    #sidebar .content_bottom
    #sidebar .block_bottom
    #sidebar #block-user-1_bottom
    and none of those produce the wanted image.

    Heck, even #sidebar_top does not add a picture on the top of the menu

    The only way I've found to work is I created #MenuSep
    Then I created a block that containts that div and inserted it in the menu.
    It works partially. Not all blocks load on everypage or if the user is logged in or not and I have those extra divisers in that case.

    Anyone could point me to the right direction.

    Modifying that drupal template has been kind of a crash course in css for me heh. I'm impressed at how flexible it is.... when it works :lol:

  2. #2
    Join Date
    Sep 2003
    Montreal, Canada

    #sidebar_bottom was explicitely declared in the php code.

    I was thinking you could take any div id and attach "_bottom" to make it append something below it :lol:

    Haha, that's what I get for trying to do css at 5am, heh.

    I've added some php code in the block template

    PHP Code:
    switch ($block->module){
    "block"// Middle Content block, we don't want menu sep image
    "<p></p><div id=\"MenuSep\"</div>"// print menusep div

    Works like a charm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts