Scaling image on flat background

16 replies · opened Aug 3, 2024

MmschejbalAug 3, 2024

Hi,

I'd like to create a home page with a circle logo that fills the screen and scales appropriately on all platforms (image attached). Now I'm using the full image Home page from your template with slider option. How can I use only the logo with the black background header and the body?

Thank you,
Maciek

SSemicolon WebSTAFFAug 4, 2024

Hello,

This is Definitely Possible! Consider using the following:

  1. Add the .bg-black Class to the `` Tag.

  2. Consider using the following code for the Header:

<header id="header" class="dark transparent-header">
  1. Use the following for the Splash Logo:
<section class="slider-element bg-black include-header vh-100">
	<img src="images/full_logo.png" alt="Logo Splash" class="d-block position-absolute top-50 start-50 translate-middle w-auto vh-60">
</section>

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

MmschejbalAug 4, 2024

Hi,

This is almost good but the image gets deformed on mobile, it becomes oval, see this page: https://rockawaybitchnyc.com/test2/indexT.html
Also, is there are way to control the position of the image, moving it up or down?

Thank you,
Maciek

SSemicolon WebSTAFFAug 4, 2024

Hello,

  1. Replace the .vh-60 Class with .max-vh-60 Class.

  2. Currently the Image is perfectly in the center of the Viewport. However, you can consider adding Custom CSS according to your needs, Example:

.slider-element img {
    margin-top: 60px;
}

The Margins can be negative (-60px) as well.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

SSemicolon WebSTAFFAug 6, 2024

Hello,

Very Happy to Help! :)

This can be changed. Currently there is no margin applied to the Logo but its just being centered within the Page based on the Height applied to the Container using the .max-vh-100 Class. You can consider using Custom CSS or any other Height Classes: https://docs.semicolonweb.com/docs/utility-classes/heights/ according to your needs. For the Custom CSS, something like this can be used:

<section class="slider-element bg-black include-header" style="height: calc(100vh - 166px);">

Additionally, make sure that you remove the .max-vh-100 Class.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

MmschejbalAug 7, 2024

Actually the indexT.html page behaves oddly even on iOS, some header links disappear and iPad layout shows the white margin...

SSemicolon WebSTAFFAug 8, 2024

Hello,

Thanks for reporting this and Apologies for the Inconveniences caused! Consider trying:

  1. Use this CSS instead:
<section class="slider-element bg-black include-header" style="height: calc(100vh - 110px);">
  1. Replace the existing Footer Code with this:
<footer id="footer" class="dark mt-0">

This should work fine. Also make sure that you place all the Codes inside the #wrapper DIV including the #footer as explained here: https://docs.semicolonweb.com/docs/getting-started/html-structure/ . Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

MmschejbalAug 8, 2024

Yes, indeed, this works.

Interestingly, the logos, the main one and the top left small logo, appear slightly oval but only on iPad, this can be observed clearer in portrait mode, do you see that? Also when resizing desktop screen or turning iPad or iPhone from vertical to horizontal, some links disappear and the header changes its expected structure (no small logo on the left) and white margins appear on iPhone.

I updated home page with the new code now: https://rockawaybitchnyc.com/test2/

Thank you!

SSemicolon WebSTAFFAug 13, 2024

Hello,

Thanks for your Patience.

  1. We have checked this out and Logo appears to be working fine for us on iPad (we are using iPad Pro).

  2. Currently, this is Default (white margins on left/right) on iPhone Landscape and you will notice this on many websites. You can fix this by adding a Custom Body Color using the following CSS Code:

body {
    background-color: #000;
}

You can change the Color value according to your needs.

For the disappearing links, this is an issue with invalid HTML Codes on your Browser: https://validator.w3.org/nu/?doc=https%3A%2F%2Frockawaybitchnyc.com%2Ftest2%2F . So fixing this should fix the issue.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

MmschejbalAug 13, 2024

Hi,

Body fixed, thanks.

Some of the code errors come from your template but I can deal with that, we can close this thread. Thank you very much for your support!

Best,
Maciek

SSemicolon WebSTAFFAug 13, 2024

Hello,

Apologies for the Inconveniences caused!

Would be great if you can point us to the Template you found those Code Validation Errors on, so that we can look into this and fix these. Additionally, please fix only the errors related to Duplicate IDs and unclosed HTML Tags as only these errors matter.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

MmschejbalAug 13, 2024

No inconvenience at all, it's not really serious I don't think, see the attached screen shot. I fixed all syntax errors on that website pages but what do you mean by "Duplicate IDs"?

M

SSemicolon WebSTAFFAug 15, 2024

Hello,

Thanks for details on this.

  1. The Error on the Screenshot provided can be ignored as it does not impact or affect the Website or Codes in any way.

  2. An HTML ID should be unique, so IDs like #header should only be there once on the Page.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

MmschejbalAug 15, 2024

Right, that's clear, thank you!

Best,
Maciek

SSemicolon WebSTAFFAug 16, 2024

Very Happy to Help! :)

Do let us know if we can help you with anything else.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard