1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Create custom image as Border

Discussion in 'Software Development' started by ashras99, Apr 26, 2004.

Thread Status:
Not open for further replies.
Advertisement
  1. ashras99

    ashras99 Thread Starter

    Joined:
    Jul 13, 2002
    Messages:
    1,044
    In my website i create a link to one image. I want when the image opens on a html page then the white or custom image will create as a border for my previous image. There are lots of images and everyone of different size.(one way is to create a border in photoshop for every image but that's a very tiresome process) I am using dreamweaver please tell me the script of doing this. If there is any tutorial then please give the direct link.
     
  2. PC_Wiz

    PC_Wiz

    Joined:
    Nov 19, 2003
    Messages:
    1,245
  3. ashras99

    ashras99 Thread Starter

    Joined:
    Jul 13, 2002
    Messages:
    1,044

    Attached Files:

  4. Snake~eyes

    Snake~eyes

    Joined:
    Apr 18, 2002
    Messages:
    640
    I'm kind of confused. Why not create a 1 cell table with 5 cellpadding and change the background of that cell. Then put the image in there.
     
  5. ashras99

    ashras99 Thread Starter

    Joined:
    Jul 13, 2002
    Messages:
    1,044
    snake you are right. You can do it in that way also. But now my problem is why the image not coming in the centre. That's it. Can you solve it.
     
  6. Snake~eyes

    Snake~eyes

    Joined:
    Apr 18, 2002
    Messages:
    640
    Code:
    <table width="100%" border="0" cellpadding="5" cellspacing="0">
      <tr>
        <td align="center" valign="middle">IMAGE CODE HERE</td>
      </tr>
    </table>
    
     
  7. ashras99

    ashras99 Thread Starter

    Joined:
    Jul 13, 2002
    Messages:
    1,044
    Snake your code is perfect if i use table for the image. But leave that, this problem is solved i use table or any other way doesn't matter.

    First check out the attached file. Right now the problem is in the htm file, i align the image in the centre, you can see the code by "Right clicking" and select view source.
    But the image is not coming in the centre.WHY? and how to solve the problem without using table or any other method.
     
  8. downtime

    downtime

    Joined:
    Oct 21, 2002
    Messages:
    759
    You've got Invalid Markup in line 18, according to Dreamweaver. If you remove line 18, it centers without the white border. If you move it to line 19, and write it like this, <div align="center"><table border=0 cellpadding=0 cellspacing=9 bgcolor="#FFFFFF"></div> it centers with the border.
     
  9. ashras99

    ashras99 Thread Starter

    Joined:
    Jul 13, 2002
    Messages:
    1,044
    I write this code and it works perfectly. Downtime thanks for your suggestion but when i write any text it adds in the image as a title. Can you tell me what to remove and where add a text (any tag required)

    <td height="2"><img src="../images/spacer.gif" width=18 height=2></td>
    <div align="center"><table border=0 cellpadding=0 cellspacing=9 bgcolor="#FFFFFF">
    <td><p><img src="1923_modelt2.jpg" width="288" height="213"></p>
    Car
    </td>
     
  10. downtime

    downtime

    Joined:
    Oct 21, 2002
    Messages:
    759
    You could add at lines
    23 <div align="center">Car
    24 </div>
    but the text will appear at the top of the page.
    It would be simpler starting with a table and cells, unless having the text at the top is what you want.
     
  11. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/224119

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice