Results 1 to 5 of 5

Thread: aligning image in correct place

  1. #1
    Join Date
    Nov 2010
    Posts
    115
    Thanks
    27
    Thanked 0 Times in 0 Posts

    Default aligning image in correct place

    Hi All,

    In a td how can i place any image at an exact place i required.(Valign=top,bottom,center) Using these wont solve my problem i want my image between center and bottom of my TD. How can i get it!!!!!!!!!!!

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    You can actually do a number of things;

    1 - you could cheat and edit the image to add extra height or width onto the physical dimensions.

    2 - you could add margins to the img tag to push the image away from the walls of the containing cell -
    <img src=images/pic.jpg" alt="pic" style="margin-top:15px; margin-left:25px;" />

    3 - you could add an image as a background to the table cell -
    <td style="background:url('images/pic.jpg') 15px 25px no-repeat; width:175px; height:80px;">&nbsp;</td>

    One of these should suit your circumstances but its up to you to decide.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. The Following User Says Thank You to Beverleyh For This Useful Post:

    hemi519 (11-16-2010)

  4. #3
    Join Date
    Nov 2010
    Posts
    115
    Thanks
    27
    Thanked 0 Times in 0 Posts

    Default

    once again thanks

  5. #4
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    No problem - personally I prefer the 2nd option
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  6. #5
    Join Date
    Nov 2010
    Posts
    115
    Thanks
    27
    Thanked 0 Times in 0 Posts

    Default

    myself also went with second option and solved my issue

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •