Refine Image Display when Scaling Down on Screen

When I zoom in, the image area goes off-screen. I want it to stay fixed in place.

<img style="margin-bottom:-10px;width:280px;height:280px;border-adius:50%
;border:3px solid white" id="image" src="@Model.Image" /> <br />

<a id="editbutton" href="#"><i style="border:3px solid white;border-radius:80%;
 padding:12px;z-index:5000;background-color:#128edb;font-size:15px;margin-left:40%;margin-top:-200px;color:white;" class="fa fa-pencil"></i></a>
click here for image description

Answer №1

If you want to make adjustments to your design, you'll need to tweak some css and html code. Take a look at the snippet provided below:

To customize the position of the edit icon, modify the right and bottom values in the #editbutton element.

.imgWrap{position:relative;width:280px;height:280px;}
#editbutton{position:absolute;right:-20px;bottom:-20px}
<div class="imgWrap">
<img style="margin-bottom:-10px;width:280px;height:280px;border-adius:50%
;border:3px solid white" id="image" src="@Model.Image" /> <br />

<a id="editbutton" href="#"><i style="border:3px solid white;border-radius:80%;
 padding:12px;background-color:#128edb;font-size:15px;color:white;" class="fa fa-pencil"></i></a>
 <div>

These changes should help you achieve the desired design outcome. :)

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Apply CSS3 attributes in real time

The for loop I have is functioning properly: <div id="page1div"></div> <script> list = " "; for (var i = 0 ; i < length ; i++) { list = "<h1 class='entriesdisplayed'>" + item(i) + ...

Tips for loading all background images simultaneously

I just created my first website page with a few background images that crossfade. However, I am experiencing an issue where the next background image takes some time to load during the crossfading effect if the page is not cached on the user's comput ...

Alter the design when the height of a div is adjusted

On my webpage, I have multiple divs displayed in a masonry layout. The masonry effect works smoothly, but I am facing an issue with the divs expanding in height when users leave comments. The masonry layout does not automatically adjust to accommodate the ...

How can I make my webpage unselectable except for specific content within a div using CSS and JavaScript?

During a live editing session, I am looking to make only specific portions of the page selectable. Can someone provide guidance on how to disable selection for everything except within a particular div? ...

Content is the main driver for CSS Flexbox dynamic aspect-ratio code

When creating a grid layout for a webpage, I opted to use Flexbox. My goal was to incorporate some automatic functionality so that additional grid boxes could be included without the need to manually add classes or styles in the HTML code. One particular f ...

Instructions for selecting all checkboxes in an HTML table with just one click

Developing an aspx page with 3 HTML tables, I am dynamically adding checkboxes to each cell. Additionally, I have a checkbox outside each table. When I check this checkbox, I want all checkboxes in the corresponding HTML table to be checked. However, curre ...

Increase the line spacing within paragraphs by eliminating the extra space at the top and bottom

Trying to adjust line height in a paragraph using CSS. Here is the HTML: <div> <p>Lorem ipsum dolor sit amet, oratio doctus his an. Nisl saperet delenit ad eos, his eros solet vituperata et, has tantas nemore consetetur ne. Nam cu au ...

I am confused as to the reason why this code is not functioning properly within the HTML Box Gadget on Google

I've been experimenting with Google Sites and trying to incorporate HTML and CSS without using inline styling. I followed some online guides that claimed it could be done by adding an HTML gadget and inserting the code. However, when I tried it, nothi ...

What is preventing me from concealing my input field when its type is set to "file"?

I've been attempting to conceal my input field of a file type, but even with the hidden attribute, it refuses to hide. https://i.sstatic.net/jyMrn.png https://i.sstatic.net/P59wV.png Interestingly, once I remove type="file", the code succe ...

Using Javascript to handle form submission and enforce required input fields

Has anyone encountered an issue when trying to submit form data using a div, HTML5, and JavaScript? I noticed that if I use a submit button with the required attribute in the inputs, the validation works but the button doesn't actually submit the info ...

Drift alongside a Division in HTML5

Struggling to make an Aside tag float alongside a Section tag using CSS. Here is the HTML: <div id="WholePage"> <section> <asp:ContentPlaceHolder ID="MainContentWindow" runat="server"> </asp:ContentPlaceHolder> ...

How do I trigger a click event without actually selecting an option in selectpicker?

When I try to select an option from the dropdown menu using selectpicker, it doesn't get selected. For instance, clicking on the "two" option doesn't actually select it. How do I fix this issue with selectpicker? Here is the code snippet: ...

The Bootstrap carousel is experiencing compatibility issues with Angular 7 and is currently not functioning properly

I'm currently using the bootstrap multi carousel, and it works perfectly without a loop. However, when I try to implement it dynamically using an ngFor loop, it doesn't function as expected. Instead of sliding with multiple images, it just displa ...

What is the best way to direct a user's input in HTML with a specified format?

I'm looking for a way to create a user-friendly input format for a timestamp in the form of HH:MM. I want the input field to display "__:__" initially, and as the user enters numbers, they should replace the underscores. When they reach the colon, the ...

The communication factor that triggers the expansion of the mother element

I've been struggling with this issue for quite some time. Here is the challenge at hand: I am in the process of developing a library to streamline AJAX calls and neatly display error messages directly within a form. The dilemma: Whenever the messag ...

Creating a Stylish Navigation Bar with Bootstrap4 - Organizing Elements for Just the Right Look

I am trying to organize my content within a navbar into 3 different 'columns'. I want a logo on the left, some navigation items in the center, and the last element ("Get The App") on the right, but I am facing some challenges. Below is my code s ...

Tips for aligning placeholder and text at the center in a React Material UI TextField

Existing Layout: https://i.stack.imgur.com/Zv4Tg.png Desired Layout: https://i.stack.imgur.com/Xuj6O.png The TextField element is displayed as follows: <TextField multiline={false} autoFocus placeholder={props.defaultAmt} ...

Customizing HTML Select Elements

Can the HTML Select attribute be customized to have a flatter appearance? Although I can set the border to be 1px solid, the dropdown part still appears 3D and unattractive. ...

Stretching a row in Wordpress Visual Composer and setting the direction to Right-to-Left

Whenever I attempt to expand a row using the row settings in Visual Composer, the row stretches but the alignment of the row becomes completely off. This issue only occurs when the body direction is set to direction:rtl in the CSS. You can view the websit ...

Using jQuery and Flask-WTF to achieve live word count in a TextAreaField - a step-by-step guide!

I am interested in adding a real-time word count feature to a TextAreaField using jQuery. I found an example that I plan to use as the basis for my code: <html lang="en"> <head> <script src= "https://code.jquery.com/jquery ...