Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help Forums Windows Startup Programs Database Spyware and Malware Removal Guides Computer Tutorials Uninstall Database File Database Computer Glossary Computer Resources
 

Welcome Guest ( Log In | Click here to Register a free account now! )



Register a free account to unlock additional features at BleepingComputer.com
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


Important Announcement: We have two terrific contests running on the site that I wanted all our members and guests to know about.

The first contest is the HP Magic Giveaway, which is underway as of November 28th. More information can be found at this topic, which will be updated very soon with further information.

The second contests, is for the chance to win two Seagate FreeAgent external hard drives. More information about this contest can be found here.

These are both amazing contests and I suggest everyone submit an entry for them.

- BleepingComputer Management
 
Reply to this topicStart new topic
> Tables To The Top Please, html question
rigel
post Jan 2 2008, 09:17 PM
Post #1


BC 1st Responder
******

Group: Moderator
Posts: 5,276
Joined: 21-October 04
From: South Carolina - USA
Member No.: 3,905



Can a table be forced to the top of a web page? I tried placing one, but it still shows background around the top and edges.

Web page test



--------------------
"In a world where you can be anything, be yourself." ~ unknown
I will be away from 12/4 - 12/08. Please contact boopme, garmanma,
or quietman7 if needed.
Thanks!
Go to the top of the page
 
+Quote Post
groovicus
post Jan 2 2008, 11:29 PM
Post #2


Hail Groovicus!
******

Group: Site Admin
Posts: 6,265
Joined: 5-June 04
From: Vermillion, SD
Member No.: 689



Table elements have "built-in" margins and padding. I can't think how to fix it right now.. I have been coding servlets since about 9:00, and I can no longer think straight. I'll take a peek at it again in the morning when I am a little more clear headed.

EDIT: I should say built in padding.. tables do not have margins.


--------------------
Go to the top of the page
 
+Quote Post
Dialer
post Jan 3 2008, 12:20 AM
Post #3


Distinguished Member
*****

Group: Members
Posts: 642
Joined: 4-November 07
From: The Great State of Disarray
Member No.: 167,506



For the width, specifying "100%" rather than a fixed width should work. It's especially useful for when people have different screen resolutions from the fixed width you specified.

For the top ... hmmmmm. I don't think I've ever had a problem with that. I haven't coded in over a year, and I can't recall if tables will accept a valign="top" code, but it's worth a try until you get a definitive reply from groovicus or someone else with more recent experience.

One thing you might want to do is get rid of all the stuff in there that Geocities says to delete. I doubt it'll have any impact on the table, but it's good coding practice not to have bloated HTML.

Hope this helps a bit.


--------------------
Go to the top of the page
 
+Quote Post
Amazing Andrew
post Jan 3 2008, 05:01 AM
Post #4


Bleepin' Night Watchman
******

Group: BC Advisor
Posts: 1,767
Joined: 5-December 05
From: The City of Saint Francis, by the western sea
Member No.: 43,307



Try adding this to the <head> section:

HTML
<style type="text/css">
<!--
body {
margin-top: 0px;
}
--
>
</style>


--------------------
root@bleepingcomputer>./sig_file
Signature Not Found.

Go to the top of the page
 
+Quote Post
groovicus
post Jan 3 2008, 08:28 AM
Post #5


Hail Groovicus!
******

Group: Site Admin
Posts: 6,265
Joined: 5-June 04
From: Vermillion, SD
Member No.: 689



This works. I just tried it. Change this line:
<table border="0" cellpadding="0" cellspacing="0" width="1024" height="543">

to this:
<table border="0" cellpadding="0" cellspacing="0" width="1024" height="543" Style="position: absolute; left: 0px; top: 0px;">

It works in Firefox, and it should work in IE. I am on a Linux system at the moment, so I couldn't test it on there.


--------------------
Go to the top of the page
 
+Quote Post
rigel
post Jan 3 2008, 08:15 PM
Post #6


BC 1st Responder
******

Group: Moderator
Posts: 5,276
Joined: 21-October 04
From: South Carolina - USA
Member No.: 3,905



groovicus, you get the golden cookie!!! Your solution worked. Thank you for the code.

Amazing Andrew, I also tried your fix and it worked a little wink.gif It did bring the page to the top, but the left margin didn't work.

Dialer, valign didn't work.

I appreciate the help guys. The web page comes from a template in Frontpage I am playing with. Maybe one day it will become something worthy of the web. cool.gif

This post has been edited by rigel: Jan 3 2008, 09:14 PM
Reason for edit: Corrected the other right


--------------------
"In a world where you can be anything, be yourself." ~ unknown
I will be away from 12/4 - 12/08. Please contact boopme, garmanma,
or quietman7 if needed.
Thanks!
Go to the top of the page
 
+Quote Post
Amazing Andrew
post Jan 3 2008, 10:48 PM
Post #7


Bleepin' Night Watchman
******

Group: BC Advisor
Posts: 1,767
Joined: 5-December 05
From: The City of Saint Francis, by the western sea
Member No.: 43,307



I never get the golden cookie sad.gif


--------------------
root@bleepingcomputer>./sig_file
Signature Not Found.

Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 4th December 2008 - 01:13 PM


Advertise   |   About Us   |   Terms of Use   |   Privacy Policy   |   Contact Us   |   Site Map   |   Chat   |   Tutorials   |   Uninstall List
Discussion Forums   |   The Computer Glossary   |   Resources   |   RSS Feeds   |   Startups   |   The File Database   |   Malware Removal Guides

© 2003-2008 All Rights Reserved Bleeping Computer LLC.