Jump to content

Same Code


stuart7398

Recommended Posts

Hi.

The css code below are for 3 buttons. They are all the same apart from the 'padding-left' property.

Is it possible to have just one piece of code to apply to all buttons, then a separate piece of code to control the 'padding-left' property?

 

Any help is appreciated.

 

Thanks,

Stuart.

 

 

.button_apply_now {
  position: absolute;
  left: 8px;
  top: 3px;
  margin: 0px;
  padding-left: 1em;
  cursor: pointer;
}
.button_training {
  position: absolute;
  left: 8px;
  top: 3px;
  margin: 0px;
  padding-left: 1.8em;
  cursor: pointer;
}
.button_answers {
  position: absolute;
  left: 8px;
  top: 3px;
  margin: 0px;
  padding-left: 1.7em;
  cursor: pointer;
}

 

Link to comment
https://forums.phpfreaks.com/topic/101116-same-code/
Share on other sites

.button_apply_now ,

.button_training ,

.button_answers

{

  position: absolute;

  left: 8px;

  top: 3px;

  margin: 0px;

  padding-left: 1.7em;

  cursor: pointer;

}

 

 

.button_apply_no

{

  padding-left: 1em;

}

 

.button_training

{

  padding-left: 1.8em;

}

 

.button_answers

{

  padding-left: 1.7em;

}

 

Link to comment
https://forums.phpfreaks.com/topic/101116-same-code/#findComment-517150
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.