douxian1895
2013-05-03 19:25 阅读 35
已采纳

CakePHP .actions按钮标签

I started coding in CakePHP lately and love the quick and easy interface framework it provides. I have one model that has kind of a long name and it is causing UI issues with the Action buttons. When I am in the CRUD index page for the model the text within the anchor tag displays outside of the background image used to make the button. Here is a link to a screenshot for what I am talking about...

http://imgur.com/xLD7Z3v

Does anyone know how to modify the CSS for this so that it will word wrap where necessary?

EDIT for Nunuser: Here is the HTML code for the button:

<div class="actions">
    <h3>Actions</h3>
    <ul>
        <li><a href="/users/add">New User</a></li>
        <li><a href="/user_types">List User Types</a></li>
        <li><a href="/user_types/add">New User Type</a></li>
        <li><a href="/user_statuses">List User Statuses</a></li>
        <li><a href="/user_statuses/add">New User Status</a></li>
        <li><a href="/region_program_offices">List Region Program Offices</a></li>
        <li><a href="/region_program_offices/add">New Region Program Office</a></li>
    </ul>
</div>

Here is the CSS Style for the button:

.actions li {
  list-style-type:none;
  margin:0 0 0.5em;
  padding:0;
  white-space:nowrap;
}
cake.generic.css
* {
}
cake.generic.css
ul, li {
  margin:0 12px;
}
cake.generic.css (line 66)
Inherited frombody
body {
  font-family:'lucida grande', verdana, helvetica, arial, sans-serif;
  font-size:90%;
}
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • 已采纳
    dongtan7418 dongtan7418 2013-05-04 20:09

    The default stylesheet is called cake.generic.css and is located in app/webroot/css/. Remove white-space: nowrap; from .actions li at line 498.

    点赞 评论 复制链接分享

相关推荐