NameSilo

HTML Problem

Spaceship Spaceship
Watch

dc1pop

VIP Member
Impact
13
Im creating a website and im currently having a small issue. Im trying to add a margin between a table and an outer border. This margin works fine on the left hand side but not on the right hand side.

The site looks fine in firefox and works perfectly as i imagined it would. However in internet explorer this is not the case and it just cuts part of it off. You can see by checking the site below what i mean:

Site

If anyone knows how i can fix this problem in internet explorer id be very greatful.

Thanks.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Code:
<!-- Parses the information from the date column in the database to this cell -->
<td>
<div class="date">This news was posted on: 2007-02-01
<div> <-- this should be a close div not a open one
</td>
it would help if you close down the tags properly.
 
1
•••
Well ive fixed that and it hasnt made a difference. Thanks for taking the time to look over the code though.
 
0
•••
The overlap on the right side is the amount you've moved from the left, it appears. You can choose to reduce the width of the "news boxes" or convert to a variable width (ex. %).

-Steve
 
0
•••
Il have a look into doing that now steve. It seems ive managed to fix the news page however the rest of the site hasnt reflected it in the same way which is just as strange.

Think ive found the problem. When a table is in the <div> class tages and set to 100% width in internet explorer it makes it to wide (even when ive set the margin to be 5px from the main outside border. When the table is set to 99% width it is fine and the margin is read fine aswell.

Any one know why this could be?
 
0
•••
Validate your code: oops
There is no point trying to get others to sort the look until all the important errors are gone. Why ?

sitepoint said:
Why should we spell-check our text before publishing it on the web? Because mistakes and errors can confuse readers and detract from the important information. The same can be said for markup. Invalid markup can confuse browsers, search engines and other user agents. The result can be improper rendering, dysfunctional pages, pages that remain unindexed by the search engines, program crashes or the end of the universe as we know it!

If our page doesn't display the way we intended, we should always validate our markup before we start looking for other problems (or asking for help on SitePoint). With invalid markup, there are no guarantees.

You start off badly - no DTD or <html> tags.
If you don't use a DTD, then the browser needs to guess a bit what is coming to it.
It also throws the browser into quirks mode, this leads to difficulties in consistency between browsers...
Fix Your Site With the Right DOCTYPE
I would avoid using the windows character set too..

Admittedly, most errors seem to be related to &nbsp; incorrectly written (?) you have
Code:
alt"Stadium Guide Logo"
missing the =
 
1
•••
My mistake missing the <html> tag, which i have now duley fixed.

Looking up validation and always getting this error:

"This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details."

I dont understand this as its a link to another page on the site. I dont generally follow web standards as very few sites do (although i know really i should).

Any help is appricated,
 
0
•••
I dont generally follow web standards as very few sites do (although i know really i should).
Yes, you should....

The error about the ampersand is not a biggie. It just means you should write them out like &amp; instead of just &.

You still have no DOCTYPE though ... see link in previous post.

I can't quite figure out why you are actually using tables for this site :o
and I think you are suffering a bit from divitis ;)
 
0
•••
Thanks again, i think it might be better to re-template the whole site which isnt to much of a problem. Im workin gon it locally which is why you cant see all changes currently :)

Thanks for your help. Appricated.
 
0
•••
Yeah, I agree with the above posts with regard to compliance with standards...if a site looks weird in IE or FF or anything, the first thing you ought to do is run it through a syntax checker and a w3c compliance checker. This makes sure your HTML is completely standards compliant, which (for me) has fixed 99 percent of my issues (forgetting to close div's is a huge problem for me, apparently ^^).
 
0
•••
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back