简体   繁体   中英

div inside button not showing

Fiddle

I am making a social button, and I want it to look sort of like a custom g+ sign in button:

在此处输入图片说明

However, when I put the second div (to hold the right part of the button), It doesn't show:

在此处输入图片说明

HTML:

<div id='p' style='display: inline-block'>Testing Testing 123</div>

CSS:

#p {
    height: 25px;
    width: 50px;
    background: #371e41
}

There is no enough space for the letters in the button. If you increase the width of the button, putting for example width: 300px in the button, the letters will show.

#b {
    height: 25px;
    width: 300px;
    ...
}

Fiddle

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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