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.

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Jul 2010
    Posts
    2
    Member #
    22484
    I can get a style to work if it is in-line in the code, but it doesn’t work when it is in the style sheet.

    Page with class in stylesheet: ichg2011 [dot] org/test.shtml
    Page with style in line html: ichg2011 [dot] org/test_noclass.shtml

    What am I doing wrong with this?

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Your CSS file is in a subfolder, so you need to indicate that the folder is in another spot.

    Change this:
    Code:
    background-image: url('images/ichg2011_20.png')
    to this:
    Code:
    background-image: url('../images/ichg2011_20.png')
    There are other problems with this layout, specifically that it's tabular when it doesn't need to be, but this will at least get you started.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Junior Member deanographics's Avatar
    Join Date
    Feb 2011
    Posts
    26
    Member #
    26637
    I also prefer the styling to be in a separate CSS sheet in a separate folder. It just keeps things neater.

  5. #4
    Member
    Join Date
    Jan 2011
    Location
    Edmonton, Alberta
    Posts
    82
    Member #
    26483
    Liked
    2 times
    Not to mention it is extremely easy to apply global CSS values when you don't have to rewrite them on every page. Inline CSS is good for quick fixes, but an external CSS sheet is almost always the preferred method.
    Check out some of my work: http://www.jr-webdesigns.com

  6. #5
    Junior Member deanographics's Avatar
    Join Date
    Feb 2011
    Posts
    26
    Member #
    26637
    Inline styling is a great tool for small changes like the above poster mentioned. I use it for small color changes to certain words or fonts etc... It is really helpful and has its place but overall a CSS Stylesheet is the way to go

  7. #6
    Senior Member Harmonic's Avatar
    Join Date
    Jan 2011
    Location
    Toronto
    Posts
    291
    Member #
    26468
    Liked
    23 times
    The standard is to have a folder called style or even css. I too use inline sometimes, but admittedly, it's mainly when i'm too lazy to open op my style.css again haha.

    I find it is a quick way to change paddings on some custom headings.


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 12:35 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com