SitePoint Sponsor

User Tag List

Results 1 to 13 of 13

Thread: CSS help!!!

  1. #1
    SitePoint Zealot Nu1's Avatar
    Join Date
    Jul 2000
    Location
    California
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking CSS help!!!

    I am trying to design my site so that it does not loose it's design. Is using CSS the best way to keep the font from being resized? I am afraid that if I use CSS my site will not be displayed by browsers consistently. (the major browsers of course) Also do any of you recomend using style sheets to link to? and why?
    "Don't sweat the small stuff"

  2. #2
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I may well be wrong, but I think you are referring to fixed/absolute sizes rather than relative.

    However there is little difference in this respect in using CSS over HTML for it, but I would strongly urge you to use CSS simply because it is so much more flexible, and easier to maintain.

    Linking to style sheets is what I use (I very rarely use <STYLE>) simply because you can have 2 or style sheets for one site, and changing one attribute in the external sheet is reflected across the site.

    Is that what you meant?
    I swear to drunk I'm not God.
    » Matt's debating is not a crime «
    Hint: Don't buy a stupid dwarf ö Clicky

  3. #3
    SitePoint Zealot Nu1's Avatar
    Join Date
    Jul 2000
    Location
    California
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Nicely put!

    That is definitely what I mean. Is there a source you would recommend for learning some quick CSS tips on style sheets and linking?

    If you do that would be nice. Nice FLICK (from bugs life) icon by the way!
    "Don't sweat the small stuff"

  4. #4
    SitePoint Member
    Join Date
    Dec 2001
    Location
    UK
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, CSS saves you a lot of time and as weirdbeardmt said it's a lot easier to maintain. Again, I link to CSS externally, however, I've heard Netscape 4x browsers do not support this? I read somewhere not to long ago, that you have to place the relationship (rel="stylesheet") in a certain place, along with the other attributes. Anyone else heard of this?

    However, weirdbeardmt you state you don't use inline stylesheets because you can't just change one file. Well you can if you place it in a include file, whether this has an extension of .inc, .php, .asp, .txt and so on And simply include it all of your documents. Although, this isn't practical, and defeats the object of using a method such as: <link rel="stylesheet" type="text/css" href="yourstyle.css">

    Nu1: I've included some links below, which may be of assistance to you.

    http://www.w3schools.com/css/ - great reference site
    http://css.nu/pointers/ - this site has links to loads of useful CSS tutorials

  5. #5
    Gone!
    Join Date
    Aug 2001
    Location
    Witty Location Parody
    Posts
    3,889
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Theres one on this site which I flicked through and it started me off well. You can find it and others here.


  6. #6
    <C²: web standards /> cybercodeur's Avatar
    Join Date
    Dec 2001
    Location
    Montréal
    Posts
    729
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    These posts have pretty much answered the question completely. I thought I'd jump in just to add a few notes here and there.

    CSS in external style sheets works just as well in NS4 than in IE. I've used it for over a year now with no problems. I don't know about position order though. This is how I've always used it and it works.


    <link rel="stylesheet" href="styles.css" type="text/css">


    Also while it is trus you can use includes to minimize the use and spreading on inline styles, I believe it is still far better to simply link to external files as these will grant you the largest possibilities in terms of file optimization.
    Denis Boudreau <C²/> - Web Standards & Accessibility
    [+] ICQ number: 115649885 || Email: denis@cybercodeur.net
    [+] Daily Weblog on Web standards and accessibility : CYBERcodeur.net

  7. #7
    SitePoint Wizard
    Join Date
    Oct 2001
    Location
    Tucson, Arizona
    Posts
    1,858
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nu1: I would avoid using absolute sizes, because the Web is meant to be flexible. Taking control away from the users is never a good thing. Information is far more important than design.

    matt17485: Nav4 certainly does support linking to external style sheets, but the browser's support for styles is somewhat limited.

  8. #8
    SitePoint Member
    Join Date
    Dec 2001
    Location
    UK
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I agree the use of external stylesheets are better than includes of inline css.

    I think I read it on a forum at PHPBuilder, with regards to Netscape 4.0 (not 4.6 or 4.7). I've never tested with Netscape 4.0, however. Therefore I cannot really back this up, I know external CSS linking works with 4.7 though.

  9. #9
    <C²: web standards /> cybercodeur's Avatar
    Join Date
    Dec 2001
    Location
    Montréal
    Posts
    729
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You also have to think of users with impaired vision. If you prevent them from enlarging the font size on your site, you're preventing them from accessing it. Period. Is that what you really want?

    Never forget to think in terms of Web usability.

    I'd really appreciate it if my alomost blind grand-mother could see your site when she'll get to it.
    Denis Boudreau <C²/> - Web Standards & Accessibility
    [+] ICQ number: 115649885 || Email: denis@cybercodeur.net
    [+] Daily Weblog on Web standards and accessibility : CYBERcodeur.net

  10. #10
    SitePoint Zealot Nu1's Avatar
    Join Date
    Jul 2000
    Location
    California
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool Thanks!

    Thanks for the cool and extensive info to all. Some of you did remind me that I should keep it simple instead of complex and constrained.

    I am planning to use CSS with PHP for a more dynamic site and work at it from there. Thanks again!
    "Don't sweat the small stuff"

  11. #11
    SitePoint Member
    Join Date
    Dec 2001
    Location
    UK
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using CSS with a server-side language makes it even easier to make sure you get desired results - presentation wise for all browsers (well the majority at least). Good luck anyway with your CSS.

  12. #12
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For NN4 using an external stylesheet is the only way to go. I've run into situations where declaring styles in the <head> or (especially) in-line makes NN4 freak, yet the same styles applied in an external stylesheet work fine.

    Strange but true.

  13. #13
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Thanks!

    Originally posted by Nu1
    I am planning to use CSS with PHP for a more dynamic site and work at it from there. Thanks again!
    In which case you have no excuse for writing CSS that doesn't work in every browser!


    However, weirdbeardmt you state you don't use inline stylesheets because you can't just change one file. Well you can if you place it in a include file, whether this has an extension of .inc, .php, .asp, .txt and so on And simply include it all of your documents. Although, this isn't practical, and defeats the object of using a method such as: <link rel="stylesheet" type="text/css" href="yourstyle.css">
    You're right, but as you then explain, this doesn't achieve anymore than using an external style sheet. But of course if you are using this method, you may as well generate the <HEAD> components (where the <LINK REL> stuff goes) dynanimcally, in which case you can place suitable tags for IE or NS or Opera or whatever.
    I swear to drunk I'm not God.
    » Matt's debating is not a crime «
    Hint: Don't buy a stupid dwarf ö Clicky


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
  •