• To me, w3Schools is the ultimate resource for HTML, CSS and an awful lot more which is beyond me. These guys know how to do it…
    So WHY, when I find a nice dropdown menu on the W3Schools website, that I want to use I’m the header of my Twenty Twenty Three theme, does WP adulterate it?

    The link I provided goes to the W3Schools dropdown I wanted to use, but when I copied the CSS into the customiser, and the HTML into a Custom HTML block within a Row in the Header, does WP add <br /> at the end of every link, and </p> after every button – completely wrecking the lovely look of the dropdown?

    I finally thought I’d cracked it when I used CSS to make the <br /> “display: none;” but (of course) WP just added it all again!

    The CUSTOM HTML block, isn’t in fact a custom html block at all, it’s a block which you can add your own html to, as long as WP approves. It’s like customising your own car, but the only paint you’re allowed to use must be grey (gray).

    Even LOCKING the block is a joke! What’s that about? You lock it, and then when you come back to it, it’s been altered…

    I’ve searched for a plugin to stop WP messing with my html, but reading the small print suggests they don’t always work. If anyone knows of a solution to this (other than using a different CMS) I would be very grateful.

    Of course, I would use a plugin if you know of a reliable one!
    Andy

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • I understand it can be really frustrating if you are unable to see your plain HTML and CSS does not work the way you expect it to.

    Since WordPress uses blocks as its main unit of building, it tries its best to extrapolate whatever you type or paste, into blocks.

    If you are trying to build a menu it is best to begin by using a navigation block and use its style options as much as possible to replicate the font and bg colors etc. Finer tweaks can be added using the Additional CSS section. But then WordPress does add its own wrappers that need to be accounted for while adding CSS.

    The last resort would be to build a custom block, and there are good tutorials on how to do so in learn.ww.wp.xz.cn.

    Thread Starter andynick

    (@andynick)

    Thank you for your reply @nagpai but I have to wonder whether you’re aware of W3Schools..?
    I’m not talking about my html and CSS here, I’m talking about theirs. That’s why I included the link.

    Have you see the mess the WP Navigation Block displays when viewed on older devices? It’s not a good advert for WordPress. A great many people still use older devices, and they are too often disregarded by developers.

    It’s ridiculously tricky to have a variety of menus in navigation blocks (why?) and it’s also difficult to change the hamburger cut-off point on the Navigation Block – very frustrating.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Why does WP meddle with CUSTOM HTML?’ is closed to new replies.