SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking Fun with CSS and IE6

    Hi, all. Still having problems with my CSS.
    First, I think my link works, but only partially. I have a background and text and link styles defined in my stylesheet. When I link it to the main page of my website, only the "text-decoration: none" to remove the underlines on my links gets carried over -- the background image does not. I do not have the background set in the main page. Also, this setting does not carry over to other pages linked to this page (but I didn't put the rel link in each page; do I have to do that?). Why does the purdy background image in my stylesheet not carry over to the main page?

    Also, I tried to use a table to align my email tag on the right margin of my main page, across from my address on the left. It doesn't align it on the right; it simply aligns it to the right (one td) of the address, and in the middle of the td (i.e., not on the top line of the 3-line address). How can I get my email to appear all the way over to the right, and parallel with the top line of my address.

    Once again, thanks for your help.

  2. #2
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Would you be able to post a sample of the code that you are using so we can see what the exact problem is?

    -Colin
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is my main page link:

    <link rel="stylesheet" type="text/css"
    href="virtualashley stylesheet.html" title="virtualashley stylesheet">

    This is my stylesheet code:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
    "http://www.w3.org/TR/REC-html40/strict.dtd">
    <html>
    <head>
    <style type="text/css">
    BODY { background-image: url(starbackground.gif); background-repeat x; font-family: papyrus; font-size: 12pt; font-color: FFFFFF; }
    A:link { font-family: papyrus; font-size: 12pt; font-color: FFFFFF; text-decoration: none }
    A:active { font-family: papyrus; font-size: 12pt; font-color: FFFFFF; text-decoration: none }
    A:visited { font-family: papyrus; font-size: 12pt; font-color: FFFFFF; text-decoration: none }
    </style>
    </head>
    </BODY>
    </html>

    Also, the color of my text isn't showing up (I'm assuming that's because my background, by default, is white, and the text, by default is black, and these are what shows up because my background isn't showing up).

    Thank you.

  4. #4
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    One more thing

    I did remember to put the terminal semicolon before the final parameter in the text/font syntax on my sytlesheet page; I just forgot to type it in the above post. I still doesn't work. The only thing that works is the text-decoration code.

    Thanks for your help.

  5. #5
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Saoirse, try this.

    1. Make a new file in Notepad. Call it something simple, perhaps "styles.css".

    2. In that new file that you created from step 1, copy and paste this code, and nothing more.
    Code:
    a:link {
      color: #ffffff;
      font-family: papyrus;
      font-size: 12pt;
      text-decoration: none;
    }
    
    a:visited {
      color: #ffffff;
      font-family: papyrus;
      font-size: 12pt;
      text-decoration: none;
    }
    
    a:active {
      color: #ffffff;
      font-family: papyrus;
      font-size: 12pt;
      text-decoration: none;
    }
    
    body {
      background-image: url(starbackground.gif);
      background-repeat: repeat-x;
      font-family: papyrus;
      color: #ffffff;
      font-size: 12pt;
    }
    3. In your source HTML file, copy and paste this line of code into your page's <head>.
    Code:
    <link rel="stylesheet" type="text/css" title="my styles" href="styles.css" />

  6. #6
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thanks, all.

    Colin,

    I copied the code as you suggested and it worked -- to a point. The background will only load so far, so I decided to add background position 100%, thinking that would make it repeat endlessly. I just moved the band of background down further on the page. Ugh!

    You should know that I started teaching myself HTML a month ago, and now I so wish I hadn't! CSS2 seems to be just a whole new way of writing HTML and everything I thought I learned before is outdated. For example, both my "For Dummies" book as well as the webmonkey tutorial write the link you gave me with the title at the end. I still don't have a reason for why it DID link the way I wrote it (the way For Dummies and webmonkey said to write it), but not all the styles were applied. This seems to be an ongoing problem, given my current

    I'm trying to take out the <div> codes I have now in the page (what a pain! I have no idea how to center anything now), to see if that gives me a whole background (prior to this, the background loaded completely into the HTML document, written the way I had it).

    I think I just have crap software.

  7. #7
    SitePoint Enthusiast
    Join Date
    Mar 2002
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up Success!

    Thanks Colin/Colon!

    Before I ripped out the <div>s, I put -y after the background-repeat: repeat x, and the background appeared all over (now I'm thinking it's a little too busy, but that's another story . . .).

    Thanks so much for your help. I'm just playing with the style/colors of things right now. The site is VERY basic, which is fine.

    Next problem: I still can't align the mail to at the bottom of the page on the right (it's in a <td> across from my address). If you want to take a shot at that, I would so appreciate it (but I realize there are others who probably need your help, too).

    Thanks. Have a great weekend.

  8. #8
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If it is located in a separate table cell (<td>) across from your "address," then adding align="right" inside of the cell tag (e.g. <td align="right">) should do the trick. Does that work?

    -Colin
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.


Bookmarks

Posting Permissions

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