如何使 WordPress 块引用出现在页面左侧而不是右侧?

发布于 2024-10-10 22:55:06 字数 223 浏览 5 评论 0原文

我对此很陌生。我很感激我能得到的任何帮助。我还没有在互联网上找到答案。 (至少,我不明白!)

当我在 WordPress 中使用块引用时,它会显示在屏幕的右侧。有时,我希望它出现在屏幕的左侧。我该怎么做?这是我想在屏幕左侧显示的块引用(如下)。它当前显示在屏幕右侧。

过上更好的生活不在于物质,而在于感恩。

"

I've very new at this. I appreciate any help I can get with this. I haven't found an answer on the internet yet. (At least, not one I understand!)

When I use blockquote in WordPress, it shows up on the right side of the screen. Sometimes, I want it to appear on the left side of the screen. How do I do that? Here is the blockquote (below) I'd like to have on the left side of the screen. It currently appears on the right side of the screen.

<blockquote><p>Living a better life is less about things and more about being thankful.</p></blockquote>"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

我一直都在从未离去 2024-10-17 22:55:06

正如上面尊敬的成员所说,如果您在 Firefox 或 Chrome 浏览器中安装了 Firebug 等插件,请右键单击块引用并选择“检查元素”。然后您将看到应用于该元素的所有规则(即效果),并且您可以显示/隐藏它们以查看它们对元素的影响,这将使您更好地了解规则对元素的作用。

干杯。

As the respected members said above, also if you have a plugin such as firebug on firefox or in your chrome browser, right click the blockquote and choose "inspect element". Then you will see all the rules(i.e effects) applied to that element and you can show/hide them to see their effect on the element which will give you a better understanding of what the rules are doing to your element.

Cheers.

星星的軌跡 2024-10-17 22:55:06
<blockquote style="text-align:left;">Test</blockquote>

这将在逐个报价的基础上进行更改。

更好的解决方案是打开主题的 style.css 文件,搜索 blockquote,然后将 text-align:right; 替换为 text-align:left;。这将改变整个站点范围内的行为或块引用。

<blockquote style="text-align:left;">Test</blockquote>

This will change it on a quote-by-quote basis.

A better solution is to open your theme's style.css file, search for blockquote, and replace the text-align:right; with text-align:left;. This will change the behavior or a blockquote site-wide.

决绝 2024-10-17 22:55:06

对于我正在使用的主题,二十四,正确的答案是使用:

<blockquote class="alignleft">This is my quote</blockquote>

我通过使用找到了这个Chrome 开发工具来检查演示中的示例。由于这个主题有一个特殊的类,具有良好的对齐块引用格式,因此使用它比使用样式设置覆盖 CSS 更好。请注意,在检查元素时,您会获得 CSS 的直接链接,可用于检查主题具有哪些其他类 - 非常有用!不过,您可能需要阅读一些有关 CSS 语法的内容才能解释它。

For the theme that I am using, Twenty Fourteen, the correct answer would be to use:

<blockquote class="alignleft">This is my quote</blockquote>

I found this by using the Chrome devtools to inspect the example on the demo. Since this theme has a special class with nice formatting for the aligned blockquotes it is better to use this than to override the CSS with style settings. Note that while inspecting the element you get direct links into the CSS that can be used to check which other classes the theme has - quite useful! You may need to read a bit about CSS syntax to interpret it though.

单身狗的梦 2024-10-17 22:55:06

如果将 blockquote 元素包装在它自己的 div 元素中会发生什么?例如:

    <div>
       <blockquote>
           <p>Living a better life is less about things and more about being thankful.</p>
       </blockquote>
    </div>

然后,您可以使用 float:left 将块引用控制为 div 块元素,将宽度设置得更大,以便它移动到左侧任何元素的下方,或者使用其他绝对定位的方法。

What happens if you wrap up the blockquote element in it's own div element? Such as this:

    <div>
       <blockquote>
           <p>Living a better life is less about things and more about being thankful.</p>
       </blockquote>
    </div>

You would then possibly be able to control the blockquote as a div block element using float:left, setting the width larger so that it gets moved below any elements to it's left, or using other means of absolutely positioning it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文