Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

So Firefox doesn't like my code anymore.

My website has been dormant for a good while now, but I'm working on a new site and decided to recycle my code; I grab the .php file from my documents and start editing away. When I go to view my work I notice some major problems with the spacing/alignment of my text, I refresh and it doesn't change, I refresh again and it does, I refresh once more and goes back to being retarded, etc etc. Assuming I accidentally deleted something important, I check my old website (which is also using the code) and to my horror discover it's doing it too. I get one of my friends to check and it's no better for him.

What happened? I haven't touched my site in at least 6 months and it's been just fine until recently. Is it possible that Mozilla has changed something in a recent update that makes my code invalid? It works just fine in IE and I haven't changed a thing! Gah.

You can view the problem here (Firefox only): http://delia.starcapsule.net/
One surefire way of setting it off is going to LINKING and then INFO where it will suddenly look something like this:
http://i250.photobucket.com/albums/gg24 ... 456/no.png[/img]

As opposed to this (how it should be):
http://i250.photobucket.com/albums/gg24 ... 56/yes.png[/img]

Then it just goes on and off randomly. :(

If you want to check out my code just veiw the source, given the issue involves spacing and alignment it might be a good idea to look at my CSS, too: http://delia.starcapsule.net/css.css
 

e

Sponsor

Mmm. It is weird. It's as if it renders it smaller than it actually is on the first run through, and then if you use Firebug or JavaScript to dynamically refresh the CSS (without refreshing the page), it's formatted properly afterwards.

What I'd try, if I were you, is putting that content (text) div at the bottom, so it is rendered at the very end (just before the </body> tag).

Honestly, I'm not sure if it'd work, but I figure it's worth a shot. Nothing seems wrong in your CSS or anywhere else.
 
I couldn't duplicate your issue, so I'm going to take a wild stab in the dark...

What tag is your information in?

If you are using <p> tags or other elements, oftentimes this is an issue with the fact that Firefox defines such elements as margined elements where most other browsers define them as block elements. If that is the case, you may be able to fix it by defining these tags as block elements in a css stylesheet.

For example:

Code:
p {
	display: block;
	margin: 0px;
	padding: 0px;
}

Also, firefox often auto defines a DIV as 100% width, (which it actually should, check CSS2 standards), and this could also be an issue with CSS interpretation of your DIV element or selected DIV class.
 

___

Sponsor

Looking at your HTML you have some issues that may be contributing to this in some way, although not knowing what's going on in your PHP I can't say for sure why.

Code:
<BODY>
<LINK REL=stylesheet HREF="http://www.delia.starcapsule.net/css.css" TYPE="text/css">
<style type="text/css">
<!--
body
{ 
background-image: url('http://www.delia.starcapsule.net/bg.PNG');
background-repeat: repeat-y;
background-position: left;
} 
--></style>

<img src="http://www.delia.starcapsule.net/box.PNG" style="position:absolute; left:0px; top:0px;">

<div style="position:absolute; left:217px; top:380px; width:533px;">

</body></HTML>
<h1>about the website</h1><p>

As you can see you have <link> and <style> inside your <body> and then you close out <body> and <html> before starting your content.  Try straightening this out and see what happens; it may be interfering with the way your CSS is applying somehow.  I compared the generated source when the problem is ocurring and when it is not and they're identical, so nothing is changing, but your CSS itself is simple and valid so I don't think the problem lies there.

Also try dropping your inline styles and using CSS classes and/or IDs to change your DIV elements from within the stylesheet; once again i can't see why you're having a problem here but it's always better practice to avoid inline styles.

Let me know if any of that helps.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top