
Consider this image. Here I have a background image(only the outer part of the player not the buttons timing and the progress bar). Now I want to place the play, next, previous and stop buttons in the places exact same places.
#playbuttonimg{
margin-left:-95px;
position: absolute;
top:20px;
}
#pausebuttonimg{
margin-left:-95px;
position: absolute;
top:20px;
display: none;
}
#prevbuttonimg{
position: absolute;
/*margin-left:-15px;*/
top:24px;
}
#stopbuttonimg{
position: absolute;
margin-left:18px;
top:24px;
}
#nextbuttonimg{
position: absolute;
margin-left:50px;
top:24px;
}
If I use this style, in desktop browser it comes perfectly but in the mobile devices the margin-left being negative makes the button go beyond the screen and the positive margins will be visible but not placed accordingly.
And as it is mobile website it should fit properly in all the mobile devices. How can I do this in css? Is there a way to do it without using media queries? Or is there any other way so that I can make it fit properly across all the mobile devices?