WordPress.org

Forums

HTML not showing in themed page (4 posts)

  1. Meanderling
    Member
    Posted 1 year ago #

    Hi all,

    I'm running the latest version of WP and a premium theme, which I have customised using a child theme. So far, so good...

    I've created something using straight HTML/CSS, but can't get it to show on my site.

    I'm new to HTML, CSS and WP (but stick with me...), the HTML I have works fine locally, but doesn't show anything within my theme/site. I've tried putting it within a wigdet and pasting it directly into the code editor (without using the theme's pagebuilder option). I've also played with removing some of the initial classes (within my code - controlling container position, etc), but nothing happens.

    Fiddling in Code Inspector, I've changed some of the position: and display: attributes (is that the right word?), which has meant I can see some of my code, but not laid out correctly. I therefore think it's something to do with one of these styles and they way they interact with the page's container and/or theme styles. Unfortunately I don't know enough about position or display, to be able to figure out if this is the problem, or how to fix it. If someone could help, that would be fantastic!! Here's the example.

    You might suggest I contact the theme's author, but that's mostly a dead-end. Quickest way is to figure it out myself and learn something in the process. I'm just not sure what to try next - can anyone help??

    Many thanks!!

  2. awa4000
    Member
    Posted 1 year ago #

    The height for the div with class .ch-item is set to 0px and everything contained therein is invisible . Change it to whatever size height you need to view your content and it should work.

  3. Meanderling
    Member
    Posted 1 year ago #

    Hi there!

    Thanks so much for your answer. I had a look via code inspector and I can see what you mean about .ch-item showing a height of 0px. But the actual CSS for .ch-item is height: 100%;

    I followed up the CSS classes and see the first instance of 'height: 0px', seems to come from .article which is part of the page/theme code and hasn't been touched by me. I'm guessing there must be something in the hierarchy of the code informing this value. Any idea what it could be??
    (everything in .mecontainer is my code and works fine outside of WP)

    Many thanks.

  4. Meanderling
    Member
    Posted 1 year ago #

    SUSSED IT!!!! Yaaay :D

    I was missing some styles, in particular a height in .ch-grid li - doh! Don't you just hate sloppy code (naughty me) ;)

    Thanks for your help though, I appreciate it!!

Topic Closed

This topic has been closed to new replies.

About this Topic