此页面上的文字有一个测试部分,我可以使用CSS重新定位。
http://www.theshowroomonline.co.uk/clothing
<div id="test"><a href="http://www.theshowroomonline.co.uk/product/1980s-stanley-platos-dress">1980′s Stanley Platos Dress</a></div>
<div class="wrapper-price">
<div class="entry-price">
£106.00 </div><!-- entry-price -->
<div class="entry-post-thumbnail">
<a class="tcp_size-medium" href="http://www.theshowroomonline.co.uk/product/1980s-stanley-platos-dress"><img width="200" height="300" src="http://www.theshowroomonline.co.uk/wp-content/uploads/2012/10/stanley-platos-dress-front-200x300.jpg" class="attachment-medium wp-post-image" alt="stanley-platos-dress-front" title="stanley-platos-dress-front" /></a>
</div><!-- .entry-post-thumbnail -->
</div><!-- .wrapper-price -->
#tcp_shortcode_all_clothing #test {
position: relative;
top: 298px;
}
但div似乎没有出现在其他页面上,所以我无法重新定位文本:
答案 0 :(得分:0)
如果你在你提供的页面上查看来源(http://www.theshowroomonline.co.uk/outerwear),你会发现元素实际上并没有包含在id =“test”的元素中,这就是你的问题,似乎你正在为这些页面使用两个不同的模板。
此处问题页面的示例:
<tr class="tcp_first-row">
<td id="td-post-480" class="tcp_col tcp_4_cols tcp_col_1">
<div id="post-480" class="post-480 tcp_product type-tcp_product status-publish hentry">
<a href="http://www.theshowroomonline.co.uk/product/vintage-gianfranco-ferre-coat">Vintage Gianfranco Ferre Coat</a>
<div class="wrapper-price">
<div class="entry-price">
£180.00 </div><!-- entry-price -->
<div class="entry-post-thumbnail">
<a class="tcp_size-medium" href="http://www.theshowroomonline.co.uk/product/vintage-gianfranco-ferre-coat"><img width="200" height="300" src="http://www.theshowroomonline.co.uk/wp-content/uploads/2012/10/gianfranco-coat-front-200x300.jpg" class="attachment-medium wp-post-image" alt="gianfranco-coat-front" title="gianfranco-coat-front" /></a>
</div><!-- .entry-post-thumbnail -->
</div><!-- .wrapper-price -->
与工作页面对比:
<tr class="tcp_first-row">
<td id="td-post-491" class="tcp_col tcp_4_cols tcp_col_1">
<div id="post-491" class="post-491 tcp_product type-tcp_product status-publish hentry">
<div id="test"><a href="http://www.theshowroomonline.co.uk/product/1980s-stanley-platos-dress">1980′s Stanley Platos Dress</a></div>
<div class="wrapper-price">
<div class="entry-price">
£106.00 </div><!-- entry-price -->
<div class="entry-post-thumbnail">
<a class="tcp_size-medium" href="http://www.theshowroomonline.co.uk/product/1980s-stanley-platos-dress"><img width="200" height="300" src="http://www.theshowroomonline.co.uk/wp-content/uploads/2012/10/stanley-platos-dress-front-200x300.jpg" class="attachment-medium wp-post-image" alt="stanley-platos-dress-front" title="stanley-platos-dress-front" /></a>
</div><!-- .entry-post-thumbnail -->
</div><!-- .wrapper-price -->
如上所述,您确实需要将id="test"
切换为class="test"
,因为ID应该是页面唯一的。