开发者

want to make text in a line

I have following markup: I want the text to be on the green b开发者_JAVA技巧ackground in a line . How can I achieve this? I have this kind of problem happen, what can I change so that in the future these types of problem not happen?

<style type="text/css">      
#tb_enter {    
}
.gib_nav {
    background-color:green;
    background-position:0 0;
    background-repeat:no-repeat;
    border:medium none;
    cursor:pointer;
    display:none;
    float:right;
    height:324px;
    position:relative;
    width:25px;

}
#text{
margin-top:100px;
-moz-transform: rotate(-270deg);    
width:25px;
}    
</style>

<html>
<head>
<title>How to use external cursor type using CSS</title>
</head>
<body>
<div style="display: block;" id="tb_enter" class="gib_nav">
   <div id="text">Enter Rahul Gib</div>
</div>
</body>
</html>


Remove the width specification on your .gib_nav class. This will allow the contained text to push out the width of the div as necessary.

Example:

http://jsfiddle.net/VaY84/

Edit:

(see comments) author of question was looking for white-space: nowrap; CSS style attribute to make the text within the div display on only one line, rather than wrapping to multiple lines.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜