Jump to content

CSS or PHP issue?


harkly

Recommended Posts

My pictures are dropping down a line when I end the span after a completed a href tag. But if I enter the span after the <a href> tag but before my image is added and the </a> the image goes to where I want. Right beside the number.

 

Here is my code that doesn't work but makes sense to me to use ....

 

                      echo "<div id='artContent'>";
                        echo "<span class='image'>";
                          echo $count++ ;
                 echo ". a href='image/$artid/$imgid.jpg' class='thickbox' title='$title by $fullName'>
                                              <img src='image/thumb/$artid/$imgid.jpg' border=0 width=75 height='100' title='$title by $fullName' align=left valign=top></a></span>";

                        echo "<span class='info'>";
                         echo "<a href='image.php?imgid=$r[imgid]' title='$title by $fullName'>".$title."</a> <br>".$dt."<br>".$medid."<br>".$bio." ";
                      echo "</span></div>";

 

This code puts the image right beside the number.

 

                     echo "<div id='artContent'>";
                        echo "<span class='image'>";
                          echo $count++ ;
                 echo ". <a href='image/$artid/$imgid.jpg' class='thickbox' title='$title by $fullName'></span>";

                 echo "<img src='image/thumb/$artid/$imgid.jpg' border=0 width=75 height='100' title='$title by $fullName' align=left valign=top></a></span>";

                        echo "<span class='info'>";
                         echo "<a href='image.php?imgid=$r[imgid]' title='$title by $fullName'>".$title."</a> <br>".$dt."<br>".$medid."<br>".$bio." ";
                      echo "</span></div>";

 

the CSS

#artContent {margin: 0px 0px 100px; padding: 0px; color: #000;}
    #artContent .image {float: left; text-align: left; margin-left: 190px; padding: 0px; margin-top: 0px;}
    #artContent .info {color:#000000; font-size: 14px; font-family: Sylfaen;letter-spacing: 0.1em;}
    #artContent a {color:#4970BF; font-size: 14px; font-family: Sylfaen; text-decoration: none; letter-spacing: 0.1em;}
    #artContent a:hover {color:#a69; font-size: 14px; font-family: Sylfaen; text-decoration: underline; letter-spacing: 0.1em; }	
    #artContent .search {float: left; text-align: left; margin-left: 190px; padding: 0px; margin-top: 15px;}

 

Any suggestions???

 

 

images.bmp

Link to comment
Share on other sites

well..PHP has nothing at all to do with layout...whatsoever.

so it's definitely the CSS.

 

You forgot the beginning span tags

echo "";
echo "";
echo "";
echo "";

 

also you need to specify span in your CSS

.image span {

    float:left;

}

and tell it to float:left.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.