CSS内容离开屏幕(CSS Content goes off the screen)

编程入门 行业动态 更新时间:2024-10-28 04:27:30
CSS内容离开屏幕(CSS Content goes off the screen)

我试图集中内容,但我的内容正在右侧,并离开屏幕

这是我的代码:

<?php /* Template Name: About Us */ $aboutheading = get_field('about_heading'); $aboutus = get_field('about_us'); get_header(); ?> <section> <div class="container"> <div class="row"> <div class="col-md-4"> <h2> <?php echo "$aboutheading"; ?></h2> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-sm-4 col-md-6"> <p class="lead"><?php echo "$aboutus"; ?></p> </div> </div> </div> </section> <?php get_footer(); ?>

这是实时链接: http : //www.abiglittlebiz.com/trevelle/about-us/

我正在努力实现div变得敏感

I am trying to center the content but my content is going on the right side and goes off the screen

Here is my code:

<?php /* Template Name: About Us */ $aboutheading = get_field('about_heading'); $aboutus = get_field('about_us'); get_header(); ?> <section> <div class="container"> <div class="row"> <div class="col-md-4"> <h2> <?php echo "$aboutheading"; ?></h2> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-sm-4 col-md-6"> <p class="lead"><?php echo "$aboutus"; ?></p> </div> </div> </div> </section> <?php get_footer(); ?>

Here is the live link:http://www.abiglittlebiz.com/trevelle/about-us/

what I'm trying to achieve that the div becomes responsive

最满意答案

你有$ aboutus Non-Breaking Space

在这种情况下,文本不能中断并转到新行。 从您的内容中清除不间断的空格或试试这个:

<p class="lead"><?php echo str_replace('&nbsp;', ' ', $aboutus); ?></p>

You have in your $aboutus Non-Breaking Space  

In this case, text can't be break and go to new line. Clear Non-Breaking Spaces from your content or try this:

<p class="lead"><?php echo str_replace('&nbsp;', ' ', $aboutus); ?></p>

更多推荐

本文发布于:2023-07-05 15:54:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1039173.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:屏幕   内容   CSS   Content   screen

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!