douhan9467 2015-09-21 14:19
浏览 57
已采纳

页面中的两个独立部分

I want to make two different portions for an image to be shown on the right side and some code on the left.

Here is the code that you'll understand seeing

<h2><?php echo $data['user'] ?> - Profile Page</h2>
<center><p id ="greet" align="left">Next Generation Gaming - <?php echo $title ?></p></center>
<p><center align="right"><img src='images/skins/<?php echo $data['SavSkin'] ?>.png' width="580" height"110"> </center></p>

<p id ="greet"><?php echo "Banned : ".$pban ?></p>
<p id ="greet">Money : <?php echo $data['money'] ?></p>
<p id ="greet">Banked : <?php echo $data['Bank'] ?></p>
<p id ="greet">Kills : <?php echo $data['kills'] ?></p>

<p class='text-alert' id ="greet">Kill Death Ratio : <?php
$kd = $data['kills'] / $data['deaths']; echo round($kd, 2); ?>
</p>

<p id ="greet">Admin Kills : <?php echo $data['AdminKills'] ?></p>
<p id ="greet">Cookies : <?php echo $data['cookies'] ?></p>
<p id ="greet">Cakes : <?php echo $data['cakes'] ?></p>
<p id ="greet">Biscuits : <?php echo $data['biscuits'] ?></p>
<p id ="greet">Icecreams : <?php echo $data['icecreams'] ?></p>
<p id ="greet">Race Won : <?php echo $data['RaceWon'] ?></p>
<p id ="greet">Quiz Won : <?php echo $data['ReactionTestWon'] ?></p>
<p id ="greet">Command Used : <?php echo $data['TotalCmdsUsed'] ?></p>
<p id ="greet">Total Warnings : <?php echo $data['TotalWarnings'] ?></p>
<p id ="greet">Total Logins : <?php echo $data['TotalLogins'] ?></p>
<p id ="greet">Registered Date : <?php echo $data['RegisteredDate'] ?></p>
<p id ="greet">Last Login : <?php echo $data['LastOnlineDate'] ?></p>

On the second like you could see that i have added an image

<p><center align="right"><img src='images/skins/<?php echo $data['SavSkin'] ?>.png' width="580" height"110"> </center></p>

What i was trying to do is make that image to be shown on the right side of the page and the rest of them to the left. Through what way could it be possible?

  • 写回答

1条回答 默认 最新

  • dongsu7049 2015-09-21 14:29
    关注

    You probably want to use some CSS

    Rewrite

    <p><center align="right"><img src='images/skins/<?php echo
     $data['SavSkin'] ?>.png' width="580" height"110"> </center></p>
    

    as

    <div style="float:right;"><img src="images/skins/<?php echo $data['SavSkin'] ?>.png" width="580" height"110" /></div>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 CSS实现渐隐虚线框
  • ¥15 有没有帮写代码做实验仿真的
  • ¥30 vmware exsi重置后登不上
  • ¥15 易盾点选的cb参数怎么解啊
  • ¥15 MATLAB运行显示错误,如何解决?
  • ¥15 c++头文件不能识别CDialog
  • ¥15 Excel发现不可读取的内容
  • ¥15 关于#stm32#的问题:CANOpen的PDO同步传输问题
  • ¥20 yolov5自定义Prune报错,如何解决?