Welcome to TalkGraphics.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2013
    Location
    Echzell - Germany
    Posts
    11

    Default define width and height in img-tag

    Hi there,

    how canI define the attributes width and height in an img-tag looks like "<img src="..." width='200px' height=#300px'>"

    Thanks for help

    Oliver

  2. #2
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,830

    Default Re: define width and height in img-tag

    Well you don't need to.

    If you fill a box with an image you get source code:

    <span class="xr_ar" style="left: 203px; top: 152px; width: 200px; height: 300px; background:url('index_htm_files/4.png') 0px 0px no-repeat;"></span>

    If you drag an image onto your page you get source code:


    <img class="xr_ap" src="index_htm_files/8.png" alt="" title="" style="left: 556px; top: 18px; width: 200px; height: 300px;"/>

    What are you hoping to achieve?

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  3. #3
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,918

    Default Re: define width and height in img-tag

    As Acorn says, you don't need to.

    Are you trying to resize an imported image Oliver. A lot of web programs allow you to import an image & then using a dialogue window allow you to resize it. This isn't the way Xara works.

    Import your image into the Xara page (1024 x 628 for example) then think whoops, that's to big. You dont get a dialogue window to resize it, what you do is physically resize it on the page. Using the selector tool drag the corner to scale the image to the desired size, ensuring Lock Aspect is on and the final image size is in exact pixels. Save the xar/web file. Export the website. Xara automatically exports the image to the size set on the page.
    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  4. #4
    Join Date
    Aug 2013
    Location
    Echzell - Germany
    Posts
    11

    Default Re: define width and height in img-tag

    Hi Arcon, hi Egg,

    thanks for your help. I know this and it's surely the right way to put the attributes in an inline-style. but my customer is using a seo-tool. this tool show him missing these attributes in the image-tag. can you recommend a good, modern seo-tool to analyse webpages.

  5. #5
    Join Date
    Nov 2013
    Location
    Hertfordshire, UK
    Posts
    1,488

    Default Re: define width and height in img-tag

    Best SEO tool is Google themselves. Get your website registered with Webmaster tools and then go to HTML Improvements

    https://support.google.com/webmasters/answer/80407

    https://www.google.com/webmasters

    Don't use any SEO analyzers, these "tools" often produce false reports. Skip the middle man and go straight to the search engine themselves.

 

 

Tags for this Thread

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
  •