Jump to content

Why defind same class twice


Stephen68

Recommended Posts

Not sure if I'm reading into this right or not but I looked at some code where they defined values for a class twice. Not sure if this is

common practice or not, can anybody let me know. Here is a sample of what I mean

 

First they have it here

 

.water_bar, .blue_head_full, .blue_head_center, .blue_foot_center, .blue_head_filler {

    font-size: 8pt;

 

    height: 4.5ex;

 

    line-height:4.5ex;

    vertical-align: middle;

    text-align:left;

}

 

 

and then later on they put something like this later on in the page

 

.blue_head_full {

    text-align:center;

 

    position:absolute;

    top:0px;

    left:0px;

width:100%;

    border-top: 1px solid white;

}

 

 

Is this just to set values that are the same in all of those classes at once? Will to still keep the first

set of values after redefining the class again?

 

Sorry if this seems really silly but I just wanted to know, I can see I guess that it would save some typing for sure.

 

Stephen

Link to comment
https://forums.phpfreaks.com/topic/83553-why-defind-same-class-twice/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.