Zero padding image for mobile
dipanjan94
Registered Users Posts: 83 Big grins
Hello, I'm very new to Smugmug and I currently trying to make my website look nice in mobile. My website link is https://www.dipanjanpal.com/
I have the following two questions -
1. In my homepage, I want to make the very first image fill the width of mobile screen, like it's there in PC. I have chosen zero padding for right and left in pc, but Idk how to implement the same for mobile so that it shows from end to end without any white parts on either side.
2. If you scroll down on my homepage, you'll notice that after two pictures, I have a brief link about the sections About and Gallery, each one accompanied by a picture. In my mobile view, it shows first the two pictures, and then the two links. Ideally, I would want the About part under my picture and the Gallery part under the drone picture (bridge). How can I do this?
Any help would be appreciated, thank you very much!
I have the following two questions -
1. In my homepage, I want to make the very first image fill the width of mobile screen, like it's there in PC. I have chosen zero padding for right and left in pc, but Idk how to implement the same for mobile so that it shows from end to end without any white parts on either side.
2. If you scroll down on my homepage, you'll notice that after two pictures, I have a brief link about the sections About and Gallery, each one accompanied by a picture. In my mobile view, it shows first the two pictures, and then the two links. Ideally, I would want the About part under my picture and the Gallery part under the drone picture (bridge). How can I do this?
Any help would be appreciated, thank you very much!
0
Comments
I hate to tell you this, but I see lots of white space on my desktop.
This will remove the margins on mobile. Add this to your theme's custom CSS section. There is a link in my signature if you don't know how.
That code is specific for that image block. If you change the block, this will not work.
That should get you started. I'll need more time to investigate #2.
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
You'll need to remove those two Photo Blocks and both Text Blocks and use ONE HTML/CSS Block.
Add this to the HTML section:
Add this to the CSS section:
I've tested this on my test page and it works. You may need to adjust text sizes for your liking, but that is an easy fix.
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
In the second one, I love how it looks on mobile (I made a couple of tweaks). For wide laptop screens, it is showing a lot of white space. I want the gap between my image (About part) and the drone image (Gallery part) to be constant, like 50px or something for all laptop/big screens, without affecting the current mobile view. How can I achieve this?
Also, could you please help me create a similar HTML/CSS block for the "Purchase Prints" "Licensing Image" and "Contact and collaborate" part? I tried to copy your code and come up with something, it worked well on my laptop but looks very weird in my phone so I deleted it. Thank you so much in advance!
Find this:
Change the
width: 100%
towidth: 1050px
and addmax-width: 100%;
. Like this:Here is why. You have two images with a width of 500px each. That would be 1000px total width. If you want 50px between the two images, make it
width: 1050px
. Addingmax-width: 100%;
allows it to switch to smaller devices when need be.All work on your other question like I did before.
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Remove the three Text Blocks and add ONE HTML/CSS Block.
Add this to the HTML Section:
Add this to the CSS Section:
The text will fill 100% width-wise, except for the
60px
padding left/right in the container. So the text block will change depending on screen size, you have to use a fixed width. I picked475px
. I added20px
margins top/bottom so when the screen size gets smaller, you still have room, top/bottom. Theauto
margins left/right will allow it to center it.Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Also, I think HTML is pretty cool, I love learning new things!
I expected you to make some small changes and I'm glad it worked and you learned something new. That's one of the things I like to do to is trying to learn new ways of doing things.
BTW, you have some nice images!
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk