2016-01-21 30 views
-1

這是我的代碼: 我想添加樹形圖像的側面寬度300px高度300px,並且當您單擊iomage時,它會將它們重定向到新頁面。如何在PHP中並排添加兩個圖像?

<!DOCTYPE html> 

<Title> Services </Title> 
    <link rel="stylesheet" href="css/style.css" /> 
</Head> 
<body> 
<div> 
<h2> <div style=text-align:center;"> <img src="images/banner-services.jpg" alt="banner-services" /> </h2> 
<h2 style=text-align:center;> <b> Select The Type of Dance You Would Like to Buy </b> </h2> 
<br> 
<a href="bachata.php"> 
    <div style="width:300px;height:300px;background-image:url('images/bachata-logooo.jpg');"> 
    <div style=text-align:center;"> Bachata 
    </div> 

    <a href="salsa.php"> 
    <div style="width:300px;height:300px;background-image:url('images/salsa-logooo.jpg');"> 
    <div style=text-align:center;"> salsa-logooo 
    </div> 

    a href="merengue.php"> 
    <div style="width:300px;height:300px;background-image:url('images/merengue-logooo.jpg');"> 
    <div style=text-align:center;"> merengue-logooo 
    </div> 
+2

這與php或javascript無關。 – Ohgodwhy

回答

0

style="display:inline-block;"<a>標籤。請注意,這將無法響應,除非分辨率高於(至少)900px,塊會溢出到另一行。

相關問題