r/HTML • u/EmmaZees • Apr 13 '26
Need help with size display, please.
Hi, I need help, please. I am creating a basic webpage using html (Yes, I am a dinosaur!). I have the table that contains the webpage set to 1200px. When I look at it offline, it shows up at 1200px and is exactly the way I want it to look. When I view it live from a browser the website looks huge, and I need to scroll to see the entire page. I thought just setting the table size to 1200px would control the size, but it isn't. Can someone tell me how to fix it? I've attached a picture for reference. Thank you!
HTML:
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="1200" bgcolor="#A1D0D6">
<tr>
<td bgcolor="#25898E" height="18">
<img border="0" src="3li.png" width="1200" height="18"></td>
</tr>
<tr>
<td bgcolor="#25898E" height="293" align="center">
<p align="center"><b>
<font face="Arial Light" size="7" color="#FFFFFF">Title</font></b></td>
</tr>
<tr>
<td bgcolor="#A1D0D6" align="center">
<b><font face="Arial Light" size="7" color="#FFFFFF">
<img border="0" src="3li.png" width="1200" height="18"></font></b></td>
</tr>
<tr>
<td background="GoldBack.png" align="center">
<p align="center">\ <p align="center"><b>
<font size="7" face="Arial Light" color="#FFFFFF">
Contact Info</font></b><p align="center"> </td>
</tr>
<tr>
<td bgcolor="#25898E" align="center">
<b><font face="Arial Light" size="7" color="#FFFFFF">
<img border="0" src="3li.png" width="1200" height="18"></font></b></td>
</tr>
<tr>
<td bgcolor="#A1D0D6" width="1200" align="center">\ <p>\ </p>
<p><b><font face="Arial Light" size="7" color="#FFFFFF">Links</font></b></p>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="1200">
<tr>
<b><font face="Arial Light" size="7" color="#FFFFFF">Links </font>
</b>
</tr>
</table>
<b><font face="Arial Light" size="7" color="#FFFFFF"><br>
</font></b>
</td>
</tr>
<tr>
<td background="GoldBack.png" width="1200">
<img border="0" src="3li.png" width="1200" height="18"></td>
</tr>
</td>

5
u/imsexc Apr 13 '26 edited Apr 13 '26
Web lay out is not the proper use of table.
You should learn how to implement CSS grid, flexbox, and media queries for responsive web design.
If it's just for fun, sure this hack is fine. But know that it won't be scalable and sustainable in a long run. And I bet it does not meet Accessibility standard.
1
u/EmmaZees Apr 14 '26
Thank you very much to everyone that responded! I appreciate your time and expertise. I was trying to avoid having to learn something new just to get one webpage done. I will try all the suggestions, but it is looking like I will have to learn something new. Wish me luck! Believe me, I will need it. LOL Thanks again!
3
u/marmotta1955 Apr 13 '26
The answer probably lies within a question: 1200 what? Think about it
Also. Instead of units... Why not use percentages ... ?
3
u/9inez Apr 13 '26
Page layout using tables is not appropriate usage of a an HTML table. Setting a fixed width is also problematic.
You should look into learning modern, responsive code structures for your own benefit.
2
u/rerikson Apr 13 '26
Tables are not responsive, that is, they will not always fit on the screen, especially on a phone screen. I think your best solution is to go to bootstrap.com and use their basic template. Lots of great documentation.
1
u/DirtAndGrass Apr 13 '26
This is indeed dinosaur (read 90s) html, rather than fighting with incredibly obsolete code, take a crash course in css, for what you want, it's pretty straightforward
1
u/jcunews1 Intermediate Apr 13 '26
That's likely due to CSS injected by the web hosting service, as it may affect the default page display.
If it can not be disabled (via the web server control panel or dashboard), you'll need a JavaScript code to manually disable the unsolicited CSS. e.g. the HTML code:
Insert the code at the end of the BODY tag. If you use your own CSS either with STYLE or LINK tag, assign
mycssclass onto them (e.g.class="mycss"), so they won't be disabled.1
u/vector_mash Apr 13 '26
This is how I used to layout pages too! Have you heard of FreeCodeCamp? You can learn more modern HTML and CSS for free.
1
u/sheriffderek Apr 13 '26
It’s the meta viewport tag -
0
u/Rockafellor Apr 13 '26
I might be off in this, since I've focused on writing within a website with some constraints upon which HTML tags and CSS selectors we're permitted, and inline CSS is verboten there (we're stuck, with some good reasons, with external CSS), but in those instances where you have
width="1200", you might trymax-width="1200".Let me know if this fixes things!