SitePoint Sponsor

User Tag List

Results 1 to 16 of 16

Thread: CSS craziness

Hybrid View

  1. #1
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS craziness

    I am making a style definition for each page in a site I'm building so that I can just use a tag like this:
    Code:
    <BODY ID="SIDEBAR">
    The problem is when I have an individual item that needs to be defined in a different manner. I have tried to use a special class and a special id. neither work. I have tried to write inline CSS for the item, and it doesn't work. Any ideas. This is my code with company identifying marks removed and substituted with generic names.
    Code:
    <BODY ID="sidebar">
      <TABLE ALIGN="center" WIDTH="100%" CeLLPADDING="0" CELLSPACING="5" BORDER="0">
        <TR>
        <TD ID="sidebaritem" WIDTH="50%" ALIGN="RIGHT" HEIGHT="20" VALIGN="MIDDLE"> 
          <P>ITEM #</P>
        </TD>
          
        <TD  ID="sidebardef" WIDTH="50%" ALIGN="left" HEIGHT="20" VALIGN="MIDDLE">
            <A TARGET="rbottom" HREF="a1.htm">Product Name</A> 
    </TD>
        </TR>
    Sketch
    Aaron Brazell
    Technosailor



  2. #2
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sketch...
    I'm not clear on what it is you are trying do/trying to accomplish.

    Could you give a little better explanation? By the way, you do know the specificty of ID, class, inline etc. right?
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  3. #3
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Creole.

    I'm discovering all the vast ins and outs of CSS. I have used CLASS and ID, but honestly, I really don't know what the differenc is.

    What I am trying to do is have a page with a set definition of font, font color, P, and H1 settings etc. I have defined that as an ID called sidebar.
    Code:
    #sidebar {yada; yada; yada;}
    .

    However, within a 2 column table, I am creating a list. The item on the one side of the list will be one way, the item on the second side of the list will look slightly different. (i.e. Tool | Chainsaw)

    These cannot be defined within the same ID as far as I know, but perhaps I'm wrong. When I try to create another ID to control this table, #sidebaritem, the text definition is not changed. Are you following me on this one?

    Basically, I want to know how to define a different <P> tag within the same ID, or how to get them to coexist on the same page when I have defined the page with one ID.

    Sketch
    Aaron Brazell
    Technosailor



  4. #4
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm kind of at the same level with CSS as you Sketch, but I think this is what's wrong.

    When you put the ID="***" in the <body> tag, I think the browser wants </body> to stop the ID for the particular instance.

    Do you get what I'm saying?
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com

  5. #5
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah, it makes sense completely, but how to fget the effect I want then....Should I do a CLASS tag for the page and ID's for a different section on the page?

    Sketch
    Aaron Brazell
    Technosailor



  6. #6
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would recommend reviewing the cascading and specificity rules for CSS. Read up on which ones take greater precedence. Swimm appears to be right i nthat when you assign a certain style to the BODY tag, that stye cascades down through all of it's child elements (which in this cade would be everything) and takes over anything that has less precedence.

    It sounds like you might be making it more complicated that it needs to be. A different style for each page? That seems like a little extreme. There MUST be portions of that style that will be the same from page to page right? Fonts? Colors? Sizes?

    Create a style that contains those global styles and THEN you can start drilling down to individual pages.

    See what I mean?
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  7. #7
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If it pleases you..I could help in your style sheet...you sound a little confused with how style sheets should be implemnted and used efficiently.
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein

  8. #8
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no pity...please guys..no pity.

    Look, I made it work. I have discovered CSS within the past 2 weeks and have been going through and making all my sites CSS-compliant. I was on the last site (been working on it all freakin' day!) and I was trying to learn from my previous mistakes in implementing CSS. I was trying to keep myself organized by using a different style (mostly the same stuff) on each page. redundancy, y'know. So this has been another part of the learning experience for me. What I did was find the sections that needed a certain sttyle and gave it an ID. Then I found the other stuff that needed a style and gave it a separate ID. I took the ID off the page altogether.

    Lyn, if you wish I can give you the link to my CSS if you wish to look over it, but I just now got done and I want to go back and pretty it all up first. Dreamweaver pretty much makes a mess of stylesheets, I've found. I appreciate you all bearing with me as I learn lessons here...sometimes the hard way.'

    Good night.
    sketch
    Aaron Brazell
    Technosailor



  9. #9
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Sketch
    no pity...please guys..no pity.

    Look, I made it work. I have discovered CSS within the past 2 weeks and have been going through and making all my sites CSS-compliant. I was on the last site (been working on it all freakin' day!) and I was trying to learn from my previous mistakes in implementing CSS. I was trying to keep myself organized by using a different style (mostly the same stuff) on each page. redundancy, y'know. So this has been another part of the learning experience for me. What I did was find the sections that needed a certain sttyle and gave it an ID. Then I found the other stuff that needed a style and gave it a separate ID. I took the ID off the page altogether.

    Lyn, if you wish I can give you the link to my CSS if you wish to look over it, but I just now got done and I want to go back and pretty it all up first. Dreamweaver pretty much makes a mess of stylesheets, I've found. I appreciate you all bearing with me as I learn lessons here...sometimes the hard way.'

    Good night.
    sketch
    i understand now...you're doing an excellent job. the best way is through experience and gathering the logics in using css.

    one note..i highly recommend you using a text editor for your css style sheet. If required, just send me an email/pm and i'll help you out with your style sheet.
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein

  10. #10
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i've been using the DW4 CSS editor but also using TopStyle 2. However, I have not registerd Topstyle 2 yet, and maybe if there's a good quality CSS-editor for free you cqan make some suggestions.

    Sketch
    Aaron Brazell
    Technosailor



  11. #11
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Topstyle is good too!
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein

  12. #12
    SitePoint Guru sowen's Avatar
    Join Date
    Feb 2001
    Location
    Stockport, UK
    Posts
    729
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sketch, Topstyle is great. I used the Lite version for a week then bit the bullet and bought it - if you are going to be using css a lot IMHO it's a must have.

  13. #13
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just hate "buying" software...lol....I like to find out if there's freeware that's comparable...and I usually find there isn't. It will probably take me a few weeks before I put out the $25 to buy Topstyle.

    Sketch
    Aaron Brazell
    Technosailor



  14. #14
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HomeSite has a great CSS editor. It lets you pick tags to use, and then brings up tons of attributes to use.
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com

  15. #15
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But Swimm,
    I don't use HomeSite. I use Dreamweaver. So I need an independent CSS editor.

    Sketch
    Aaron Brazell
    Technosailor



  16. #16
    Former Staff Member silver trophy Adam P.'s Avatar
    Join Date
    Apr 2001
    Location
    San Francisco
    Posts
    3,288
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah, i know, just mentioning it.

    maybe you'll think about HomeSite,

    I think it's only $99

    I got it free, or so-called "free", with my FW4/DW4 Studio
    SPF Mentor/Advisor 2001-2003
    SPF Designer of the Year 2002
    SPF Graphic Designer of the Year 2003
    AdamPolselli.com


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
  •