I made a couple of web sites. In my machine, their screen size was good as I could see the specified margins.


  • When viewed in my machine (1440 * 900 resolution), it looked OK with IE and Firefox;
  • But, when viewed in different machine, and in IE, there was a need of scrolling right to see the parts of the pages;

Css code was like this:

margin-left:20%; margin-top:-1%;border-style:solid; border-width:24px; padding:20px; background-color:#4A2885; border-color:#E3372E;  width:60%; align:center; valign:middle; border-spacing:5px;

And for images, code is used like:

<tr >
	<td colspan="4">
	  <img src="pics/logo.jpg" alt="www.lotus-nepal.com"  width="100%"/>

	      <td colspan="2" align="center" width="100%" >
                    <img src="pics/pic7.jpg" alt="www.lotus-nepal.com" width="100%" height= "30%" /> </td>
          <td colspan="2" align="center" width="100%" >
                    <img src="pics/pic6.jpg" alt="www.lotus-nepal.com"  width="100%" height= "30%" /> </td>

And I also used some tags like below:

<td colspan="2" align="center" width="100%" >

How I can ensure that the pages are displayed without the need to scroll right or left, no matter which ever browser or screen resolution is used .

I really thank you in advance for your valuable time for this.

Durga Basnet

Edited by DBB1: n/a

7 Years
Discussion Span
Last Post by Spain

Try removing the width="100%" from the <td> tags. You have a row with two cells with colspan="2" and width="100%". If you have 4 columns in your table, then the two cells with split the difference and get 50% each. Also, I'm assuming that the table does have at least one row with 4 columns/cells across.


Have you tried to specify 50% and 50% for each of the <td colspan="2">'s? The way you're doing it now, you would always need to have double your screen size for the code to have any sense (you can't have 200% of anything, since all its parent element's contents should sum up 100%). IMO.

Edited by Spain: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.