FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

discrepencies

 


RoughitforGreen247
Hey all,

The following is modified code taken directly from W3schools.com which works on their tryit editor. I took it and created it as a file on my frihost hosted website, but the image was not displayed. Is there something that needs to be changed for this code to work in different versions?
Code:
<html>
<head>
<style type="text/css">
img.x
{
position:absolute;
left:0px;
top:0px;
z-index:-1
}
</style>
</head>

<body>
<h1>This is a Heading</h1>
<img class="x" src="http://iequalsgamer.frih.net/Sidebar.jpg" width="100" height="180">
<p>Default z-index is 0. Z-index -1 has lower priority.</p>
</body>

</html>



Thanks.
eruct
Is it the box on the left of your webpage that fades from light to dark grey? If so I can see it....
smartbei
The problem is that the login form is shown UNDER the box instead of over it. The first problem I think is that your HTML code is very messy. Copied via view source:
Code:
<html>
<head>
<style type="text/css">
x
{
position:absolute;
left:0px;
top:0px;
z-index:-1;
}
</style>
</head>
<body>
<center>
<object width="70%">
<param name="movie" value="IEGtrans.swf">
<embed src="IEGtrans.swf" width="70%">
</object>
</embed>
<center>
<table>
</td></tr><tr><td><img class="x" src="Sidebar.jpg" width="100%" height="100%">
<br>
<p><form action=/index.php method='post'><br><br><br>Hello, Guest, you have yet to sign in.  If you are not registered, you may register <a href='register.php'>here</a>.<br>Username:<br><input type='text' name='user' size='50'><br><br>Password:<br><input type='password' name='pass' size='50'><br><br><input type='submit' value='login'></p>



</td><td width="80%">laaaaaa</td></tr>


Some things to fix:
Add a doctype. It looks like you are using html 4.01, search google for specific doctype.
Fix the object tag. SWF files have a specific object tag for them. Search google for more info.
The embed tag doesn't have a close (no </embed>).
You opened a form, close it.
Same goes for the table, body and html tags.
Then, add a dot right before the x ('.x'). The dot is to tell the browser that you are reffering to the class 'x' and not the tag 'x'.

That should be it. Good luck on building the website.
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.