• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

web page image sizes work with "_blank' but not with target=""

New Here ,
Feb 18, 2024 Feb 18, 2024

Copy link to clipboard

Copied

I have an image that is 2200 x 3000 pixels and when I try to show it in a webpage using target="_blank" it works wonderfully and scales to the size of my display. However when I display the same image in my index webpage it opens a widow where it reverts to its native size and overruns the display. I have tried making it "responsive" and every other work around suggested by Dreamweaver and nothing works. I' m havppy with how it shows up on the targeted web site but that can't close by itseld so I don't want to scatter a bunch of new tabs on a viewers browser.

 

Anybody have any ideas?

 

Alternatively, has anyone built a blank template that includes a close button that can receive a tag that for an image?

TOPICS
Bootstrap , Code , Extensions

Views

121

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 18, 2024 Feb 18, 2024

Copy link to clipboard

Copied

Please supply an online link to the page so that we can see what you have done.

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 19, 2024 Feb 19, 2024

Copy link to clipboard

Copied

quote

Alternatively, has anyone built a blank template that includes a close button that can receive a tag that for an image?


By @Peter35508677swvo

 

 

Sounds like a page overlay modal would be a better option or does the image specifically have to open in a new pop open window which is seperate from the window in which the onclick event was initiated, for some reason?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2024 Feb 19, 2024

Copy link to clipboard

Copied

quote

when I display the same image in my index page it opens a widow where it reverts to its native size...

By @Peter35508677swvo

==========

Identify the CSS selector name for your modal window and add this.

 

YourModal img {

max-width: 100%;

}

 

This will constrain modal images to the parent container's size.

 

Hope that helps.  If not, post back with the URL to your online page.

 

 

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 19, 2024 Feb 19, 2024

Copy link to clipboard

Copied

Is this what you're attempting to do?  See screenshot.

image.png

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 20, 2024 Feb 20, 2024

Copy link to clipboard

Copied

LATEST

It would be better for me to clearly understand your question, or at least your objectives, which my frenchglish doesn't help.

 

It would seem that you're fine with the page opening in _blank, but that the problem is that each time you open a new image, it generates a new tab. If this is your problem, use a unique target window name, such as foo, or _foo, to name your new target. This way, each new opening will use the same unique window, and therefore the same tab.

 

By convention, and although not formalized, it's customary to use the generic term _new, but you can just as easily use myPersonalImageViewer, or _myPersonalImageViewer, however, as with every new tab opened, beware of Javascript-related attacks, so it's advisable to minimize them by adding the rel="noopener noreferrer" attribute https://developer.mozilla.org/fr/docs/Web/HTML/Attributes/rel/noopener, https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/noreferrer

 

Please, feel free to refine your question if necessary !

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines