Giter VIP home page Giter VIP logo

Comments (5)

andybrewer avatar andybrewer commented on June 8, 2024 1

Correct. <section> tags are flex boxes. If you change it to an <article> tag, I think it'll line break appropriately for you, but it'll be left-aligned. This is by design, so developers have a flexbox and non-flexbox option without having to create custom CSS.

To get centered text with line breaks, you have a few options:

  1. Use a <header> tag inside of a <section> tag
  2. Use an <article> tag or a <div> tag and then create custom CSS to center certain content
  3. Use a <section> tag and apply custom CSS to certain elements to make them full-width

from mvp.

michealp-coder avatar michealp-coder commented on June 8, 2024

Here's a screenshot showing how the H2-H6 (or form) is colliding with the p content.

Screen Shot 2021-05-20 at 10 12 00 AM

from mvp.

michealp-coder avatar michealp-coder commented on June 8, 2024

Hi @andybrewer

So I went down the path of Option #1 and adding a header tag inside of a section now made anything inside the header have line breaks.

The trouble is that any other type of HTML tag inside of a section does not get a line break (only header tags). E.g. a form tag inside of a section has no line break. Any ideas?

Using article instead of section gives the desired behavior, I'm just hesitate to use it since semantically - my content is belongs as a section and not page article.

(Sorry if this isn't an actual bug and understand if you want to close this ticket)

from mvp.

michealp-coder avatar michealp-coder commented on June 8, 2024

I just figured out a fix and it's to make the p tag 100% wide. See the following Pull Request for more detail #64

from mvp.

andybrewer avatar andybrewer commented on June 8, 2024

Implemented: https://github.com/andybrewer/mvp/releases/tag/v1.8

from mvp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.