WordPress.org

Forums

Frontier
[resolved] Text widget makes theme canvass go black (5 posts)

  1. Matilda F
    Member
    Posted 1 year ago #

    I used the Text widget to add a JPEG in the Right Sidebar, but it made the canvass (the background behind the theme layout containers) go black.

    So I deleted it and dropped a new instance of the Text widget into another position in the Right Sidebar - and the same thing happened again.

    All I did was add html to the widget and added a DIV tag to the Custom CSS tab. I also made sure the jpg didn’t exceed the px width of the sidebar.

    I had to remove both bits of code and the canvass went back to its original pale colour.

    Why would this simple action make the background go black? I’ve already used the text widget once (for a row of share buttons) and this did not happen!.

    What is wrong?

  2. ronangelo
    Member
    Theme Author

    Posted 1 year ago #

    I’ve already used the text widget once and this did not happen!.

    This time you may have forgotten something on your code. It's hard to tell without actually seeing it. This is an example markup of an image wrapped in a div tag.

    <div id="your-image">
       <img src="http://yoursite.com/image.jpg" title="Image Name" />
    </div>

    It's also possible that your markup was correct but other markup somewhere isn't and is only showing now that something is added.

    Also, I don't know if you're aware of this but the things you've added on the Custom CSS tab aren't really being applied because the codes are commented out with /* */

    I'm seeing this on your Custom CSS tab:

    /*
     Theme Name:   Frontier
     Theme URI:    http://example.com/Frontier/
     Author URI:   http://example.com
     Template:     frontier
    
     Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
     Text Domain:  Frontier-child
    */
    
    @import url("../Frontier/style.css");
    
    /* ------------=Theme customization starts here
    
    #header {background-repeat: no-repeat;}
    
    #nav-main .nav-main {
        float: none;
        text-align: center;
        border-left: none;
        border-right: none;
    }
    
    #nav-main .nav-main li {
        float: none;
        display: inline-block;
    }
    
    #navmenu ul {margin: 0; padding: 0; list-style-type: none; list-style-image: none; }
    #navmenu li {display: inline; padding: 5px 20px 5px 20px}
    #navmenu a {text-decoration:none; color: white; font-weight: bold; font-size: 14px;}
    #navmenu a:hover {color: #FF9900; }
    
    .form-allowed-tags {display: none;}
    
    #share-buttons img {
    width: 35px;
    padding: 5px;
    border: 0;
    box-shadow: 0;
    display: inline;
    }
    
    -------------------------------- */

    Though you only needed to add this part:

    #header {background-repeat: no-repeat;}
    
    .form-allowed-tags {display: none;}
    
    #share-buttons img {
       width: 35px;
       padding: 5px;
       border: 0;
       box-shadow: 0;
       display: inline;
    }
  3. Matilda F
    Member
    Posted 1 year ago #

    Hi Ronangelo,

    So by nesting the code between /*---- */, I've effectively turned it into a comment?

    I will remove it and see what effect that has, and check the code against what you've provided. Thanks.

    PS - how are you able to see my dashboard frontier options tabs (gulp)? As the theme developer do you have access?

  4. ronangelo
    Member
    Theme Author

    Posted 1 year ago #

    So by nesting the code between /*---- */, I've effectively turned it into a comment?

    Yes.

    PS - how are you able to see my dashboard frontier options tabs (gulp)? As the theme developer do you have access?

    No, I don't have access to your Options Page but I can see what has been added on the Custom CSS tab because the content is printed on every page. You can check by visiting any page then right-click it with your mouse. Select "View page source". You will see the contents of the Custom CSS.

  5. Matilda F
    Member
    Posted 1 year ago #

    Ahh, I went and saw for myself. For some reason it didn't occur to me that when you look at View > Source it includes your CSS.
    Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic