1

这是我正在处理的部分,我想在唱片封面的图像下方包含标题/文本。

CSS 样式

img
{
  float: right; 
  padding: 10px; 
  float: right; 
  text-align: bottom; 
}       

#box1
{
  height:220px; 
  width: auto;
  padding-left:20px; 
  border: none; 
}
#box2
{
  height:230px; 
  width: auto;
  padding-left:20px; 
  border: none;
}

我的 HTML 代码

<a href ="http://nervoustwitch.bandcamp.com/album/this-modern-world-ep"><img    src="modworldsmall.jpg"></a>
<a href="http://nervoustwitch.bandcamp.com/album/bad-reputation-ep"><img src="badrepep.jpg"></a>

<H1> Releases</H1>

<p>Nervous Twitch released <B>Bad Reputation</B> their 1st EP at the beginning of 2013.            Made up of tracks recorded the previous year, featuring previous band members and Erin on drums, the 'Bad Reputation' Ep used lo-fi production to good effect and featured 5 catchy, garage punk numbers most of which remain in the live set today</p>
<p>In June 2013 the band released <B>This Modern World</B>, with a  fuller sound the band continued to experiment with their songwriting style whilst maintaining their pop sensibilities.</p>

</div>

如果您需要查看更多样式表以回答我的问题,请告诉我。谢谢

4

1 回答 1

0

摆脱float了图像并将其放在#box1div 上。添加text-align:center;以便下面的文本居中。

这是和示例。我在图像周围加了一个边框,这样你就可以看到它们,因为没有来源。

于 2013-08-04T16:50:23.273 回答