开发者

Adding a line break to a custom header css style?

开发者 https://www.devze.com 2023-04-08 05:01 出处:网络
Newbie Q here: How can I add a linebreak in a custom header style? h21 { font-开发者_开发百科size: 1.52em;

Newbie Q here: How can I add a linebreak in a custom header style?

h21 
{
    font-开发者_开发百科size: 1.52em;
    /*Equivalent of a line break here...????*/
}


You cant add a linebreak in a class declaration, but you can add margin-bottom or padding-bottom: -10px or similar varieties. You can use firebug to measure how high a linebreak on your page appears and use that value for padding or margin -bottom.

h21 {
    font-size:12.1px;
    padding-bottom: 30px;
    display: block;
}


you can use the word-wrap property. see here

an example:

h21 {
  word-wrap: break-word;
}

obs: the container element should have a width

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号