简体   繁体   中英

CSS Style in <php echo>?

I want to add CSS style

right: 10px
top: 10px

To this:

<?php echo DISPLAY_ULTIMATE_PLUS(); ?>

How do I connect these two? And where to I put the:

<?php echo DISPLAY_ULTIMATE_PLUS(); ?>

??

Because it's Wordpress and it says "Place the code in your theme codes"

Thanks

You'll need to place the code at the appropriate place within your theme file.

Since you want to apply some styles to it, you could wrap it in a div with a class assigned to it.

<div class="social_buttons">
  <?php echo DISPLAY_ULTIMATE_PLUS(); ?>
</div>

Then add the CSS to your stylesheet, usually found in the theme folder and named "style.css".

.social_buttons{
  right: 10px
  top: 10px
}

u can use this

<style>
.notificacion {
  background: red;
   border-radius: 0.8em;
  -moz-border-radius: 0.8em;
  -webkit-border-radius: 0.8em;
  color: #ffffff;
  display: inline-block;
  font-weight: bold;
  line-height: 1.6em;
  margin-right: 15px;
  text-align: center;
  width: 1.6em; 
}
</style>

<?php 
$a=3; 
echo '<div class="notificacion">', $a,'</div>';?>

Tell me if works :D

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM