I am working on a break in the phone. Therefore, I need to provide the code in a common format so that it applies to any device.
I have an image with a size with dimensions of 2350 * 180 .
I tried with these codes.
width: 100%; top: 100%; margin-top: 50%;
but they are not in the center for various devices.
then I tried it with
vertical-align: middle;
then
display: block; text-align: center;
then
<table> <tr style="vertical-align: middle;"> <td id="main" style="width: 100%;"> <img src="" /> </td> </tr> </table>
For all the CSS mentioned above, my output ----> images stick to the top edge at the top of the screen , as if I gave margin-top: 0;
Please help me and correct me.
I have 2 more questions in relation to this large image.
I now have a background image
style="background:url("img/bg.png") no-repeat fixed center top; width:100%; height:100%; "
this code only works for a few. Is there an error in my code?
The second question, when I scroll, is there a scroll bar that is visible. I added
style="overflow:hidden;" <img src=""/> tag.
Am I correcting or adding any other code?