简体   繁体   English

使用Twitter Bootstrap的Grails页面布局

[英]Grails page layout with twitter bootstrap

Hi I'm very new to twitter bootstrap. 嗨,我是Twitter引导的新手。 I have installed the plugin for grails and my .gsp file looks like this: 我已经为grails安装了插件,我的.gsp文件如下所示:

<html>
   <head>
      <meta name="layout" content="main"/>
      <r:require modules="bootstrap"/>
   </head>   
<body>
    <div class="alert">
        <button type="button" class="close" data-dismiss="alert">×</button>
         <h4>Warning!</h4>
         Text goes here
    </div>
</body>   
</html>

The bootstrap is working as expected. 引导程序按预期工作。 But my whole page is shifted towards left. 但是我的整个页面都向左移动。 It looks like : 看起来像 :

在此处输入图片说明

Don't know where I'm making the mistake. 不知道我在哪里犯错。

Thanks in advance. 提前致谢。

You need to add class called container . 您需要添加名为container类。

<body>
<div class="container">
<div class="alert">
    <button type="button" class="close" data-dismiss="alert">×</button>
     <h4>Warning!</h4>
     Text goes here
</div>
</div>
</body>

Like this... and check. 这样...然后检查。 Hope this helpful to you. 希望这对您有所帮助。

Link of EX EX的链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM