TankSpot  

Go Back   TankSpot > Blogs > Protcore!

Notices

"How can you be a protection warrior at level one?" I hear you all asking. It's a matter of heart. Of drive. Of the mentality of a protection warrior.

Leveling from 1-70 while protection specced was a pain, but it allowed me to practice my tanking skills on the way to 70. I tanked everything from VC to Gnomer to BRD, on up through all of the Burning Crusade instances as I leveled through them. And now I find myself the warrior tank in my small guild of friends who is the best geared, and is one of the go-to guys when we do our ZA attempts.

Being prot at heart has its advantages.
Rate this Entry

On CSS Polymorphism (not about WoW at all)

Submit "On CSS Polymorphism (not about WoW at all)" to Digg Submit "On CSS Polymorphism (not about WoW at all)" to del.icio.us Submit "On CSS Polymorphism (not about WoW at all)" to StumbleUpon Submit "On CSS Polymorphism (not about WoW at all)" to Google
Posted 11-07-2008 at 10:19 AM by Thireas
Updated 11-07-2008 at 03:22 PM by Thireas

As the title says, this isn't about WoW or tanking at all. I'm a web developer by trade, and I've been running into this issue with Cascading Style Sheets and how CSS rules are overridden. I don't really have a place I can tell people about things I find out about web development and design and the various technologies associated with it, but I have this 'blog. I know some of you deal with CSS and such on a regular basis, and this might be useful for somebody out there.

So, to start out, here's some HTML structure. It's fairly standard structure, though greatly simplified. I won't include any CSS at this point, I just want to show what kind of HTML I'm working with.

Code:
<html>
<head>
  <title>Testing CSS</title>
</head>
<body>
<div id="container">
  <div></div>
  <div class="test"></div>
  <div class="test"></div>
  <div></div>
</div>
</body>
</html>
So, we have a container element with some divs in it. Some have a class that sets them apart from the others, so they can be styled differently. Let's see what we can do about that style.

Code:
#container div {
  border: solid black 1px;
}

.test {
  border: solid red 1px;
}
This says that all divs within the container div should have a solid, black, 1 pixel border, and all elements with the .test class should have the same border, but red. Simple, and straight-forward, right? Not quite. Since the first rule matches all the divs with the .test class, and includes the ID of an element, it won't be overridden by the less-specific second rule.

It's odd, but true. Give it a try sometime.

EDIT: I may have just secured my nomination for 'biggest geek'. What with posting about the oddities of CSS on my WoW tanking blog.

EDIT2: Changed my description and the CSS to the right class names.

Posted in
Views 230 Comments 2 Email Blog Entry
« Prev     Main     Next »
Total Comments 2

Comments

  1. Old Comment
    Alent's Avatar
    Wierdness like this is why I use a hybrid of tables and divs for my layouts.

    inheritance with CSS is random from browser to browser, so I work to create a situation where there is no inheritance at all.
    Posted 11-07-2008 at 10:30 AM by Alent Alent is offline
  2. Old Comment
    veneretio's Avatar
    Pure CCS myself. Although for my WoW blog, I just let Wordpress do all the work for me.
    Posted 11-07-2008 at 01:43 PM by veneretio veneretio is offline
 

All times are GMT -7. The time now is 03:39 PM.