0

Recently i've posted a question on how could i possibly attach an image on top of my navibar menu. I did it thanks for help. Now i am facing with another issue. What if someone who is on my site presses Ctrl + ? And zoom in ? or zoom out? Then my picture is going to flow left or right. i want it to stay fixed position. like a pinned image. Or sth like that. I tried to put php code inside a div but it didn't work. So what can i do for it ?

Edited by pritaeas: Moved.

4
Contributors
10
Replies
40
Views
3 Years
Discussion Span
Last Post by mmcdonald
0

For a start off: This really isn't a PHP related question since it has more to do with CSS. I don't know why you're using PHP, unless, you are generating or rendering the image.

Post some code, otherwise, we cannot help.

0

Phorce is correct, this has nothing to do with PHP and will most likely be moved to CSS soon. However, wrapping your image in div tags and setting the nowrap style could solve your problem:

<div style="white-space: nowrap;">
    <img ... />
</div>

I would of course create a CSS class rather than use inline styling but the code above is just a demonstration.

Michael

0

You're going to need to add the code, the whole navbar including the image you've added please (Not the actual image, just the code used to insert). Only then can I see where the CSS should be applied.

0

What if someone who is on my site presses Ctrl + ? And zoom in ? or zoom out? Then my picture is going to flow left or right. i want it to stay fixed position. like a pinned image. Or sth like that.

@anestistsoukalis

Like what Phorce mention is correct. It's not really related to PHP at all.

I assume you are using @media queries in your CSS. That will resolve the issue you are having by setting the image position and size when you zoom in and zoom out any mobile/tablet device

Does that make sense?

0

@LastMitch - you keep mentioning mobile devices in CSS topics when none of the topics relate to mobile devices, can I ask why?

0

you keep mentioning mobile devices in CSS topics when none of the topics relate to mobile devices, can I ask why?

Base on what OP said. What would be your answer? The first thing that would pop out from my mind would be a mobile device zooming in and zooming out.

Edited by LastMitch

0

OP said:

What if someone who is on my site presses Ctrl + ? And zoom in ? or zoom out?

OP is talking about zoom regardless of device or browser, he's trying to keep an image stuck in one location by the sound sof it (To the nav).

0

OP is talking about zoom regardless of device or browser, he's trying to keep an image stuck in one location by the sound sof it (To the nav

But yes, that true, it's more technical issue than a code related. If OP wants a image being in one location but then it's CSS not PHP.

0

Don't worry, I flagged it hours ago for a category change xD OP: you need to look into positions on the image and the wrap of the image too.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.