HTML Help Urgent Please

13 replies
  • WEB DESIGN
  • |
Hi Guys I am trying to put up a web page .
But the image is from a flikr.com and I like to center the image .

But when I coppy and paste the code from flikr the image set on left hand site of my webpage ,

here is the code .

<a href="http://www.flickr.com/photos/38628813@N08/5034487589/" title="Credit score by fabioftc, on Flickr"><img src="http://farm5.static.flickr.com/4154/5034487589_928a092edc.jpg" width="254" height="198" alt="Credit score " /></a>


If you can help me with that by modigying this code and set in the middle .

I will be so happy . thanks for now .
#html #urgent
  • Profile picture of the author mavericace
    Originally Posted by Fabioftc View Post

    Hi Guys I am trying to put up a web page .
    But the image is from a flikr.com and I like to center the image .

    But when I coppy and paste the code from flikr the image set on left hand site of my webpage ,

    here is the code .

    <a href="http://www.flickr.com/photos/38628813@N08/5034487589/" title="Credit score by fabioftc, on Flickr"><img src="http://farm5.static.flickr.com/4154/5034487589_928a092edc.jpg" width="254" height="198" alt="Credit score " /></a>


    If you can help me with that by modigying this code and set in the middle .

    I will be so happy . thanks for now .
    putting a css code will do the trick
    {{ DiscussionBoard.errors[2660477].message }}
  • Profile picture of the author iamjohnbrown
    You can use CSS for the layout of the image. You can put a img tag in the css and apply it the style of aligning it in center. Its that easy. Its tough if you modify the HTML code as with stylesheet you need just one modification in case you want to move the image to the left on more than one page.
    {{ DiscussionBoard.errors[2660766].message }}
    • Profile picture of the author bestartdezign
      Originally Posted by iamjohnbrown View Post

      You can use CSS for the layout of the image. You can put a img tag in the css and apply it the style of aligning it in center. Its that easy. Its tough if you modify the HTML code as with stylesheet you need just one modification in case you want to move the image to the left on more than one page.
      YES, but more over using DIV tag is flexible. For aligning the image through CSS it's only possible by giving "%"
      {{ DiscussionBoard.errors[2660827].message }}
  • Profile picture of the author cyphix
    The alignment of the image is going to depend on the styles of the box where you put it.
    {{ DiscussionBoard.errors[2661263].message }}
  • Profile picture of the author marcusuk
    post up your url and we will help you
    {{ DiscussionBoard.errors[2662021].message }}
  • Profile picture of the author SmartWeb
    Originally Posted by Fabioftc View Post

    Hi Guys I am trying to put up a web page .
    But the image is from a flikr.com and I like to center the image .

    But when I coppy and paste the code from flikr the image set on left hand site of my webpage ,

    If you can help me with that by modigying this code and set in the middle .

    I will be so happy . thanks for now .
    You may use <DIV> to make the image align to center.
    Use the following code,

    <DIV align="center">
    your html code for image, you given above.
    </DIV>
    {{ DiscussionBoard.errors[2662380].message }}
  • Profile picture of the author icun
    <div style="margin: 0 auto;text-align:center;">
    <a href="http://www.flickr.com/photos/38628813@N08/5034487589/" title="Credit score by fabioftc, on Flickr"><img src="http://farm5.static.flickr.com/4154/5034487589_928a092edc.jpg" width="254" height="198" alt="Credit score " /></a>
    </div>

    or

    <div style="margin: 0 auto;width: 254px;">
    <a href="http://www.flickr.com/photos/38628813@N08/5034487589/" title="Credit score by fabioftc, on Flickr"><img src="http://farm5.static.flickr.com/4154/5034487589_928a092edc.jpg" width="254" height="198" alt="Credit score " /></a>
    </div>
    {{ DiscussionBoard.errors[2662903].message }}
    • Profile picture of the author Big Squid
      Add the <center> tag.


      <CENTER><a href="http://www.flickr.com/photos/38628813@N08/5034487589/" title="Credit score by fabioftc, on Flickr"><img src="http://farm5.static.flickr.com/4154/5034487589_928a092edc.jpg" width="254" height="198" alt="Credit score " /></a></CENTER>
      {{ DiscussionBoard.errors[2669733].message }}
  • Profile picture of the author web.tech
    Insert the image path and wrap the image to the use of a div. The wrapping div align center.

    <div align="center"></div>
    {{ DiscussionBoard.errors[2880086].message }}
  • Profile picture of the author varun089
    <DIV align="center">
    your html code for image, you given above.
    </DIV>

    this si the best choice to get the url in centre
    {{ DiscussionBoard.errors[2881234].message }}
  • Profile picture of the author mahesh2010
    Hi,
    just add class as shown

    .cen
    {

    text-align:center;
    //css code goes here
    }

    <div class="cen"><a href="http://www.flickr.com/photos/38628813@N08/5034487589/" title="Credit score by fabioftc, on Flickr"><img src="http://farm5.static.flickr.com/4154/5034487589_928a092edc.jpg" width="254" height="198" alt="Credit score " /></a></div>

    i have bolded class i have added to code
    {{ DiscussionBoard.errors[2884661].message }}
  • Profile picture of the author johanwhite
    I think it is so easy to put your image in the center of your web page. You should use the div tag and set align property center in it. The code is written below :
    <div align="center">
    Put your image code here.
    </div>
    By using the above code you can put your image in the center of your web page.Also you can use the CSS and put your image in the center of the page.
    {{ DiscussionBoard.errors[2884673].message }}
  • Profile picture of the author LosingMyHair
    I just can't believe how many people still use Transitional docs. I'm not starting a war... just find the align attribute funny.

    My first thought was:

    <div style="margin: 0 auto">[IMAGE CODE]</div>

    But it all does the same thing.
    {{ DiscussionBoard.errors[2886180].message }}

Trending Topics