Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi guys,
I was wondering, is it possible to remove a border from a block?
My search block doesnt need a border and must not have a background image either, i have searched the forum's and searched google and cant seem to find a working solution.
Please let me know what you guys need for you to be able to help me.
Thanks in Advance
Comment | File | Size | Author |
---|---|---|---|
#2 | index2.jpg | 287.96 KB | raymondfranco |
Comments
Comment #1
roald CreditAttribution: roald commentedYou could try the following
* Locate the following section in your style.css: "#container .sidebar .block" (around line 300)
* change the border width from 1px to 0px
This worked for one of my sites
Roald
Comment #2
raymondfranco CreditAttribution: raymondfranco commentedhi roald,
i have tried this, the borders need to be on 2px, the only block that doesnt need a border/bg image is the search block..
please view the attachment to see what i am trying to accomplish..
Comment #3
roald CreditAttribution: roald commentedWhat about adding this to the end of your CSS:
#container .sidebar .block-search {
border: 0px;
}
Comment #4
raymondfranco CreditAttribution: raymondfranco commentedWOOHOO!!!! you are a legend!!! - I owe u a case o coldies :)
now, i have tried to remove the background for that block as well.. any ideas?
------------BEFORE-------------
#container .sidebar-left .block-search { /* sidebar borders */
background-image:url(../../files/blockbg.jpg);
background-repeat:repeat-x;
background-color: #ffd108;
border: solid #e53a06 0px;
margin-top: 50px; /*top of sidebar left*/
margin-bottom: 130px;
------------BEFORE-------------
------------AFTER--------------
#container .sidebar-left .block-search { /* sidebar borders */
border: solid #e53a06 0px;
margin-top: 50px; /*top of sidebar left*/
margin-bottom: 130px;
------------AFTER--------------
tried adding in #block-search-0 after #container but no luck
Comment #5
roald CreditAttribution: roald commentedHmmm...
I don't use background images in the blocks for my site...
But generally: If you've removed the background-image stuff from the actual code and it still appears, you've either not refreshed your browser, or the background images are applied from another part of the CSS. Maybe you should try something like this:
------------AFTER--------------
#container .sidebar-left .block-search { /* sidebar borders */
background-image: none;
I'm out of office for some days now, so I cannot follow you anymore, but wish you good luck :-)
®