SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Non-Member jake4974's Avatar
    Join Date
    Jan 2006
    Location
    Down the road, it's where I'll always be
    Posts
    357
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    resetting styles

    Is there a way to reset styles?
    I want to create a div that is essentially a clean slate. Rather than try to track down and reverse a bunch of styles it's mom and dad might have, can I just reset everything? I wanna create like a little "style island" I guess.

  2. #2
    Winemaster bronze trophy BonRouge's Avatar
    Join Date
    Oct 2004
    Location
    Sendai, Japan
    Posts
    2,417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just an idea, but why don't you create a stylesheet with rules for just one class - what you consider to be all the default styles - black text, normal font size, blue links, etc (you could use !important a lot too so that the styles don't get overridden by rules above with more weight. If you did this, you could have your style island on any site - just add that stylesheet.

    (By the way, I'm suggesting this because you can't - as far as I'm aware - just reset the styles that easily).

  3. #3
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    Reset Styles?

    If you set up your style sheet right, a new Div, or any other Tag on your (old) pages are a clean slate

    CSS can Cascade, Override ezy but I donít think it is a goal, if possible avoid it.

    That means donít use (to) general CSS for everything
    not div{/*css*/}
    use a Class or Id to separate Containers or Tags
    .header{/*css*/}
    or
    #header{/*css*/}
    Last edited by all4nerds; Jan 28, 2006 at 05:34.

  4. #4
    Non-Member jake4974's Avatar
    Join Date
    Jan 2006
    Location
    Down the road, it's where I'll always be
    Posts
    357
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's not my setup. Yah there is a ridiculous number of styles that cascade down to this div, and some of them I don't want, and some I do. I discovered a handy dandy panel that shows me all the styles that have cascaded down, so I guess they can methodically be undone.
    Yes, there is a huge amount of very generalized css, enough that I'd be thinking total site reconstruction. But my vision is to get it working so hopefully how serious the "design flaws" are stands out. Applying general styles, and then removing them is a teriffic way to bloat code really fast.
    Thanks for your input guys.


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
  •