Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

I have css button on my site which is floating rectangular button. However, I want to make it full width when viewed on mobile. Can anyone help me?

Thank you!

What I have tried:

.buttonfloat-small{
position:fixed;
bottom:0px;
right:50px;
text-align:center;
z-index: 99;
}
Posted
Updated 21-Jul-17 3:55am
Comments
Wessel Beulink 1-May-17 8:14am    
You need to provide more information about the wrapper and html.
normally i would say: width 100%. But that depend on the html and containers.

1 solution

add this extra style line in mobile view media query

.buttonfloat-small{

display:block;
width:100%;
max-width:100%;
}
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900