Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
  1. #1
    Member beans's Avatar
    Join Date
    Jul 2005
    Location
    Melbourne, Australia
    Posts
    66
    Member #
    10559
    ARGH! I'm pulling my hair out over this and I know the answer is going to be so simple!
    Basically I'm very new to everything web-authoring... and I'm having a go at building my own web-page and incorporating a CSS.

    I'm just doing this on my hard drive so i'll do my best to explain my problems.

    Basically all I want my style sheet to do is make the base background white, with a fixed, non-repeating image; and make the body font black in the font face Trebuchet MS; and the left and top margins 15px.

    In the attached CSS you can see the code I have used, and the other code is for one of those navigational-type thingas to go down the bottom of the page (when it's finished).

    I inserted the css into the HEAD commands of the page like this:
    <LINK REL="stylesheet" HREF="css/main.css" TYPE="text/css">

    The page is stored in the main folder, the css and background gif is stored in a subfolder called 'css', and the file names are correct.

    When I open it in Mozilla Firefox, the only text that is affected is the navigational bit (does exactly what it's supposed to), and the background doesn't show up at all; and when I open up in IE its the same story except the background image does show up!

    I don't get it.... can you help me out at all? I feel so dumb but if I don't ask then I'll spend the next few days going insane :rambo: .

    Thanks in advance for any tips
    - gah!

  2.  

  3. #2
    Senior Member seanmiller's Avatar
    Join Date
    Sep 2003
    Location
    Glastonbury, UK
    Posts
    868
    Member #
    3263
    Liked
    1 times
    What's that "top,left" all about?

    I think that's breaking your definition and nothing's being applied.

    Change it to "top left" and then see what happens...

    Sean

  4. #3
    Member beans's Avatar
    Join Date
    Jul 2005
    Location
    Melbourne, Australia
    Posts
    66
    Member #
    10559
    Yay! Saviour! That fixed the background prob in mozilla, but there's still the issue of the body text not showing up as Trebuchet
    - gah!

  5. #4
    Member beans's Avatar
    Join Date
    Jul 2005
    Location
    Melbourne, Australia
    Posts
    66
    Member #
    10559
    Also... this css is being applied to the main frame of a set (I didn't mention frames before cuz i know how much everyone hates them...). In the frameset the border is set to "0", but since i've implemented this CSS, the borders show up in IE (not Mozilla). What could be causing that?
    - gah!

  6. #5
    Senior Member seanmiller's Avatar
    Join Date
    Sep 2003
    Location
    Glastonbury, UK
    Posts
    868
    Member #
    3263
    Liked
    1 times
    Hmmm... didn't look at that.

    I don't remember you being able to set the colour using font: - surely for that you use color: ?

    I would be inclined, if I were you, to avoid the "all attributes in one go" type syntax and define it explicitly. As far as anything else it makes the whole sheet far more self documenting...

    So you want...

    Code:
    body { 
         background-color: #AAAAAA;
         background-image: url(tpubg_main.gif);
         background-repeat: no-repeat;
         background-position: top left; 
         color: #000000;
         font-weight: medium;
         font-family: "trebuchet ms",arial,helvetica,sans-serif;
         margin-top: 15px;
         margin-right: 0px;
         margin-bottom: 15px;
    }
    etc.

    Cheers,

    Sean

  7. #6
    Member beans's Avatar
    Join Date
    Jul 2005
    Location
    Melbourne, Australia
    Posts
    66
    Member #
    10559
    Thanks Sean, you're the greatest. The reason I was doing the "all attributes in one go" thing was because I read that it makes the pages load quicker or something. Oh well i'm young and impressionable :P
    - gah!

  8. #7
    Senior Member seanmiller's Avatar
    Join Date
    Sep 2003
    Location
    Glastonbury, UK
    Posts
    868
    Member #
    3263
    Liked
    1 times
    Frames... so you have something like...

    Code:
    <frameset ... frameborder="no" border="0">
    Correct?

    Have you tried putting a style="border: none;" in the frameset tag and see if that helps?

    Not being an expert on frames I'm not quite sure about this one.

    Sean

  9. #8
    Senior Member seanmiller's Avatar
    Join Date
    Sep 2003
    Location
    Glastonbury, UK
    Posts
    868
    Member #
    3263
    Liked
    1 times
    Maybe it does make the pages load quicker, but it wouldn't be by much as we're only taking a few characters here and it most doesn't help the readability of your CSS.

    It's also far easier to break, as you can see, because if you don't put the right things in the right place then things fall apart and - of course - it's not immediately obvious why...

    Sean

  10. #9
    Member beans's Avatar
    Join Date
    Jul 2005
    Location
    Melbourne, Australia
    Posts
    66
    Member #
    10559
    Quote Originally Posted by seanmiller
    Frames... so you have something like...

    Code:
    <frameset ... frameborder="no" border="0">
    Correct?
    Didn't have the 'frameborder' bit in there.
    All fixed now.
    - gah!

  11. #10
    Senior Member seanmiller's Avatar
    Join Date
    Sep 2003
    Location
    Glastonbury, UK
    Posts
    868
    Member #
    3263
    Liked
    1 times
    Good... "job's a good 'un" as a geordie ex-colleague of mine always used to say :-)

    Sean


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:48 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com