如何将一个div与另一个div的右边对齐

时间:2016-11-17 13:59:28

标签: html css

我想将profile-nameprofile-id对齐profile-img

的右侧

这是代码:  http://codepen.io/anon/pen/PbbWjj

HTML:

<!DOCTYPE html>
<html>
<head>

  <!-- Compiled and minified CSS -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/css/materialize.min.css">

  <!-- Compiled and minified JavaScript -->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/js/materialize.min.js"></script>

  <title>Profile</title>
  <link rel="stylesheet" href="profile.css">
</head>
<body>
<div class="nav">

</div>
<div class="profile">
  <div class="profile-info">
<div class="cover-img">
<img id="cover-img" src="https://www.wedevz.com/wp-content/uploads/2016/07/Programming-Languages.png" width="100%" height="400px" >
</div>

<div class="profile-img">
<img src="http://wpmedia.news.nationalpost.com/2016/05/552448316.jpg?w=300&quality=65&strip=all&h=311" height="17%" width="17%">
</div>
<div class="profile-name">
Profile Name
</div>
<div class="profile-id">
Profile ID
</div>
</div>
</div>

</body>
</html>

Thanx寻求帮助......

0 个答案:

没有答案