[CSS] How to adjust a picture's position

Hello, guys!

I want to adjust a picture’s position like this, could you please tell me how to rewrite my code?

My code:

<table cellpadding="5" cellspacing="8" border="0" width="100%" class="fs14">
	<tbody>
	
	<div class="member-avatar" style="with:180;float:right">
	<?php echo GetAvatar($ResultUserInfo[0]["ID"], $ResultUserInfo[0]["UserName"], 'large'); ?>
			<?php //echo $ResultUserInfo[0]["ID"]; ?>
			<?php //echo $ResultUserInfo[0]["UserName"]; ?>
		</div>
		
	<tr>
	<td width="180" align="right">顾问名</td>
	<td width="auto" align="left"><?php echo $ResultUserInfo1[0]["RealLastName"];
        if($ResultUserInfo1[0]["Sex"]== 1){echo '先生';}
		else{echo '女士';}?>
		</td></tr>
	<tr>
	<td width="180" align="right">顾问资质</td>
	<td width="auto" align="left"><?php echo $ResultUserInfo1[0]["TheCountry"];
        echo $ResultUserInfo1[0]["TheDegree"]?>
		</td></tr>
	<tr>
	<td width="180" align="right">咨询内容</td>
	<td width="auto" align="left"><?php echo $ResultUserInfo1[0]["TheCountry"].'留学';?>
		</td></tr>
	<tr>
	<td width="180" align="right">咨询单价</td>
	<td width="auto" align="left"><?php echo '元半小时';?>
		</td></tr>
	<tr>
	<td width="180" align="right">咨询日期</td>
	
		</td></tr>
	<tr>
	<td width="180" align="right">咨询时间</td>
	
		</td></tr>	
	<tr>
		<td width="180" align="right" style="vertical-align: top;">咨询问题</td>
	    <td width="auto" align="left"><textarea class="w300 h160" name="UserIntro" placeholder="请写出想要咨询的问题概要,以便顾问提前准备。"></textarea></td>
		</tr>
						
		</tbody>
	    </table>

Hi zhuceyouxiang88,

I doubt that a html table is the proper choice here. This layout coiuld easily be achieved with pure css (as you implies in the thread title).

That said, it looks like you want the avatar in the table spanning over a few rows and columns.

I suggest you read up on how to make a table cell span over columns and rows:

Thank you! got it.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.