Results 1 to 3 of 3

Thread: stylesheet, javascript and general dhtml questions goes here

  1. #1
    Your very own Pikachu! Banned Peegee's Avatar
    Join Date
    Mar 2001
    Posts
    19,488
    Blog Entries
    81

    Grin stylesheet, javascript and general dhtml questions goes here

    I'll just unload question upon question in this thread as they occur (and trust me they will occur).

    Firstly, I'm making a webpage with an external stylesheet. I have a class called .bodyBackground which is supposed to display an image in a specific place and/or change the background colour for the page.

    But the image doesn't display

    Code:
    .bodyBackground
    
    background-image:url(http://forums.eyesonff.com/images/smilies/biggrin.gif);
    	background-repeat:no-repeat;
    	background-:bou::bou::bou::bou::bou::bou::bou::bou::bou::bou:left top;
    	background-color:#FCDBE4;
    }
    I used the same code (not the background-color though) in a html file enclosed in a style tag. I can't use any style tags in the webpage for this assignment (because in the event that I change the style for one page, I'll have to do it for all others, and hypothetically in a webpage of 1000 files with the same style, stylesheet > style).

    However nothing changes.....

  2. #2
    ORANGE Dr Unne's Avatar
    Join Date
    Dec 1999
    Posts
    7,394
    Articles
    1
    Contributions
    • Former Administrator
    • Former Developer
    • Former Tech Admin

    Default

    I assume the missing { is a typo when you typed it here and not in your stylesheet.

    You are using &lt;sometag class="bodyBackground">content goes here</sometag> right? Otherwise nothing will happen.

    If you specify a background image for a tag, that background image won't be displayed if the content of the tag doesn't stretch that tag enough to display the image. In other words if your image is 500x500 pixels, and you say

    &lt;div class="bodyBackground">Hi&lt;/div>

    and you don't have any other size-related markup for that div, that div will by default be only high enough to fit the word "Hi" in it, and probably take up 100% width of your screen (the default action of divs). But you won't be seeing much of your background image. If this is your problem you can put height: 500px; width: 500px; or something and see if that helps.

  3. #3
    Your very own Pikachu! Banned Peegee's Avatar
    Join Date
    Mar 2001
    Posts
    19,488
    Blog Entries
    81

    Grin

    Yep, that did the trick (put it in a td tag actually). Thanks!

    And the background color required a different class on its own. My silly webpage is on its way!

    edit: what's a way to refresh the page in mozilla? I have:

    [A HREF="javascript:history.go(0)">Click to refresh the page[/A>
    [a href="#" onclick="setCookie('style','Fluffy');">Fluffy Puff[/a>

    Where 'setCookie' is a function I can use to simply set values for cookies. The point is that 'javascript:history.go(0)' refreshes only in IE but not Mozilla :o

    also this isn't really pressing but I'm trying to remember a tag that lets you write any html code and have it show up as text. I *think* it may have started with an 'x'.
    Last edited by Peegee; 11-07-2004 at 12:21 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •