This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Calculator Programming subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. General Coding and Design => Calculator Programming
Author Message
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 22 Jul 2006 01:27:37 am    Post subject:

I'm using a fixed background image for my webpage, but the problem is is that it does not load all the way. Why is this?
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 22 Jul 2006 01:37:28 am    Post subject:

Could you provide the image or source (or both)?
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 22 Jul 2006 01:39:13 am    Post subject:

Here is the code that I have. The image I have is saved on my computer. I'll go to google and provide a link to the image.

Edit: Here is a link to the image.
Picture



Code:
<html>
<head>
<style>

.bloc2 {background-color: #101010;border: 1px solid #000000;height: 1000px;margin-top: 0px; margin-left: 120px; margin-right: 120px;}
</style>
<style type="text/css">
body
{
margin-top: 0px;
background: #000000 url('generalsbg2.jpg') no-repeat fixed;
}
</style>
</head>
<div class="bloc2">
<img src="generals.jpg">

<OBJECT id="VIDEO" width="320" height="240"
   CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
   type="application/x-oleobject">
   
   <PARAM NAME="URL" VALUE='C:\program files\apache group\apache2\htdocs\generals_1.avi'>
   <PARAM NAME="SendPlayStateChangeEvents" VALUE="True">
   <PARAM NAME="AutoStart" VALUE="True">
   <PARAM name="uiMode" value="none">
   <PARAM name="PlayCount" value="9999">
</OBJECT>


Last edited by Guest on 22 Jul 2006 01:41:55 am; edited 1 time in total
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 22 Jul 2006 01:47:10 am    Post subject:

I gave a link to the image in my previous post. Also why is it that the images dont require a full directory while in my htdocs of my apache folder while my video does?
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 22 Jul 2006 01:54:41 am    Post subject:

I've never heard of an image not loading all the way. Are you sure it's not merely being covered up or cut off? Try combining the two styles. You may want to remove the object for a test refresh to see if that was possibly causing a loading issue. Try a different image. Try it in a different browser! Finally, see if uploading the page changes anything. You should realize that by not using a DOCTYPE, the behavior of your source is bound to be unpredictable. In response to your double post, parameters that involve audio and video (and so forth) are generally passed to browser plugins, which seek the full URI.

[EDIT]

The body of the document is usually only the height of its content. Try using html {}.


Last edited by Guest on 22 Jul 2006 01:59:30 am; edited 1 time in total
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 22 Jul 2006 02:00:24 am    Post subject:

I figured out why now. I didn't specify the directory of the file. Also what do you mean by not using a DOCTYPE?
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 22 Jul 2006 02:15:39 am    Post subject:

A Document Type Declaration (DOCTYPE) is what the browser looks at before it does anything so that it will know how to go about rendering the page. If the DOCTYPE is missing, then the browser will try to make educated guesses. Don't become comfortable with the way browsers interpret things without a DOCTYPE! Each browser will do it differently, and you'll find out suddenly that you've been practicing incorrect or deprecated techniques once you try to validate a web page. Read up on quirks mode, and always, always, always test your document using the HTML/XHTML markup and CSS validators. This is the best advice I can give you.

Last edited by Guest on 22 Jul 2006 02:16:44 am; edited 1 time in total
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 23 Jul 2006 09:29:04 pm    Post subject:

How do you add a background image in firefox. No matter what I do it never shows up.

Ive done

Code:
<table width=100% border="1"; cellpadding="0"; cellspacing="0">
  <tr>
   <td align="center" background="C:/Program Files/Apache Group/Apache2/htdocs/webbg.jpg">
    <div class="f1">
   <img src="generals.jpg" alt="Generals Zero Hour Logo">
    </div>
   </tr>
  </td>
</table>

That does not work, although it works with MSIE. Its the first image im trying to get to work.


Last edited by Guest on 23 Jul 2006 09:31:02 pm; edited 1 time in total
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 23 Jul 2006 11:11:49 pm    Post subject:

Give your document an XHTML 1.0 Strict DOCTYPE and run it through the markup validator via the link I showed you earlier. The fact that you're asking how to make a background image appear in Firefox when it will only show up in Internet Explorer shows a tremendous lack of understanding as to what web standards are for. Ideally, writing source that is valid (according to W3C specifications) should remove all possible issues having to do with using different browsers to view the final product. There are some areas of divergence having to do with competing layout engines (Trident, Gecko, KHTML, etc.), but in order to realize that, you'd have to climb out of the pit of disparaged markup and acknowledge the fact that you are using seriously deprecated techniques.

Define the class in the document header or external style sheet:

[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]table tr td.foo {
_background-image: url('[address here]');
}

Refer to the class in the (X)HTML document:

[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]<table>
_<tr>
__<td class="foo">
___
__</td>
_</tr>
</table>

I notice you have a [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]<div> tucked inside the [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]<td>. Note the redundancy here, and that you should apply whatever is relating to that [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]<div> to the [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]<td> instead, saving you extra lines of code in both the style and content markups. (Remember divitis?) At any rate, you should only be using a table to organize information you would find in a spreadsheet or other charted data. (Tags have meaning!) If this one is being used for layout, then please save yourself a longer struggle and learn how to separate content from presentation using CSS.

Read this—any or all of it. Be serious about web design, or stick with working in FrontPage. This is not personal. I am being a tough, I know, but there is no such thing as pseudo-valid HTML. I'm not talking about optimizing code here; I'm talking about avoiding a potential catastrophe due to a certain corporation's rolling out a new Internet Explorer version which will break all the websites that once depended on Microsoft's hacks to operate. 'twould be better to remain on higher ground should the floodgates burst.

Last edited by Guest on 27 Jul 2006 12:44:28 am; edited 1 time in total
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 23 Jul 2006 11:24:28 pm    Post subject:

Dude thanks a lot. If you have anymore stuff like on html and other languages that would be worth reading post it here. As for right now I'm going to read up on the information in the link you gave me. I guess its true that html has taught us or atleast me a lot of crap that really shouldn't work. It's possible to have so many errors in html and it still work the same as if the errors weren't there. To be honest I didn't realize it was that bad. I'm also going to have another look at w3schools, because I didn't realize how bad I had gotten. Thanks again for the constructive criticism.
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 23 Jul 2006 11:38:02 pm    Post subject:

Newbie wrote:
...because I didn't realize how bad I had gotten.
Don't be hard on yourself. To tell the truth, CSS has been known to make even the most seasoned computer-gurus pull their hair out. If you have questions, errors, or otherwise, keep posting here or visit us in the channel for perhaps quicker assistance.

–Goose
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 25 Jul 2006 12:57:00 am    Post subject:

Have another question. How do you center a <div> tag in Firefox? I know text-align: center; works for internet explorer but not with mozilla. If its possible I'd like to be able to do it without having to set margins.
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 25 Jul 2006 01:49:38 am    Post subject:

[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]div.center {
_width: 50%; // This will accept different types of units (cm, pt, em, px, etc.)
_margin: 0 auto;
}

[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]margin: 0 auto; is shorthand for [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]margin: 0 auto 0 auto;, which in turn is an abbreviated form of:

[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]margin-top: 0;
margin-right: auto;
margin-bottom: 0;
margin-left: auto;

The [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]auto value sets the margin according to the size of the element's container.

Try adding a CSS border around the [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]<div> to be able to see the effects better.

Last edited by Guest on 25 Jul 2006 02:02:57 am; edited 1 time in total
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 25 Jul 2006 12:45:07 pm    Post subject:

Thanks that did the trick.

Edit: I set a background image for a div tag in internet explorer but it doesn't work with firefox why is that? That seems to be the only image that does not work. Also In firefox I know you have to have a windows media player addon for any embeded WMP files to work. How can I check for that? And if they don't have it direct them to a link?


Last edited by Guest on 26 Jul 2006 10:22:32 am; edited 1 time in total
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 26 Jul 2006 04:32:52 pm    Post subject:

Newbie wrote:
I set a background image for a div tag in internet explorer but it doesn't work with firefox why is that?
Beats me. I'd have to see whatever you wrote in order to let you know how to fix it. ;)

[EDIT] – The problem was resolved.

Quote:
Also In firefox I know you have to have a windows media player addon for any embeded WMP files to work. How can I check for that? And if they don't have it direct them to a link?
I have to assume now that you're using an object tag, in which case you could try the [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]standby="text" attribute.
I don't deal with scripts, plugins, and so forth—so, I haven't tested anything, but researching certainly helps. :P

[EDIT]

I just reviewed the page I linked to and found this:
Tips and Notes wrote:
Note: An object element can appear inside the head or the body element. The text between the <object> and </object> is the alternate text, for browsers that do not support this tag. The <param> tags define run-time settings for the object.
Testing it on my own confirms that it works. If there turns out to be
a problem validating the alternate text, then wrap it in [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]<p>
tags. Smile

Last edited by Guest on 26 Jul 2006 05:19:46 pm; edited 1 time in total
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 26 Jul 2006 06:39:10 pm    Post subject:

This is the code I am using.


Code:
<OBJECT id="VIDEO" width="320" height="240"
CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject">

<PARAM NAME="URL" VALUE='C:\program files\apache group\apache2\htdocs\generals_1.avi'>
<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">
<PARAM NAME="AutoStart" VALUE="True">
<PARAM name="uiMode" value="none">
<PARAM name="PlayCount" value="9999">
</OBJECT>


What am I suppose to change?
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 26 Jul 2006 06:52:49 pm    Post subject:

The URL value to just "generals_1.avi"?
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 26 Jul 2006 07:07:06 pm    Post subject:

I'll again recommend that you simply place text within the [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]<object> (but not within a parameter).

It could be...

[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]<object>

<a href="generals_1.avi">Click here</a> to watch this video in your default media player.

</object>

...but just do whatever works for you.
Back to top
Newbie


Bandwidth Hog


Joined: 23 Jan 2004
Posts: 2247

Posted: 26 Jul 2006 11:06:35 pm    Post subject:

I have one last question. With this code:


Code:
.class1 A:link {background: none; text-decoration: none; color: #FFFFFF;}
.class1 A:visited {background: none; text-decoration: none; color: #FFFFFF;}
.class1 A:active {background: none; text-decoration: none; color: #FFFFFF;}
.class1 A:hover {background: #000000; color: #FFFFFF;}


How do I make the hover background larger than the text area. I don't want to make the text larger on the hover I just want to have the background on the hover element extend a lot further than the text. Example:

Instead of the background being like this on hover:

-------
:link :
-------

it looks like this (sorry didn't look like that when I typed it up but I guess you get the idea).

-------------
: :
: link :
: :
--------------


Last edited by Guest on 26 Jul 2006 11:07:49 pm; edited 1 time in total
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 26 Jul 2006 11:55:39 pm    Post subject:


Code:
--------------
:            :
:    link    :
:            :
--------------

http://www.w3.org/TR/REC-CSS2/box.html

It sounds to me like what you want is [font="courier new;font-size:9pt;line-height:100%;color:darkblue"]padding;
.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page 1, 2, 3  Next
» View previous topic :: View next topic  
Page 1 of 3 » All times are UTC - 5 Hours

 

Advertisement