• Resolved jonphaseworx

    (@jonphaseworx)


    Hi guys,

    I’m needing assistance/guidance with a few things. I dabble quite a bit with WordPress and customization but I’ve never had to deal with this sort of setup before and the customer prefers this way as it is easier for them to update their website, so please don’t suggest doing it another way. For context, each page has a PDF embedded using EmbedPress (open to other plugins if you feel this won’t meet our requirements). The goal is for the customer to just be able to upload and replace each PDF file whenever they want to make changes to their website. If you need access to view the site, feel welcome to let me know. I’m happy to make temporary credentials for you. Now, here are the issues I am facing:

    1) The PDFs when embedded has a dark gray gutter. I am using Elementor and it has a Masking feature where you can upload a SVG which works quite well…when it works, but I can’t quite figure out how to cover up the sides and tops of the PDF documents (they need to be white to blend in with the rest of the site. Other suggestions are welcome as well. So far I have managed to figure out how to put all the pages on one page to eliminate the gray gutter in between pages, all that remains is the surrounding gutter.
    2) For the menus, I would like the activate link to be the same maroon as in the logo (#800000) and also to remove the underline when hovering. I’ve played around with the CSS but I am not winning.
    3) It seems EmbedPress is limited in that you can only have a height and width for one single PDF and as each PDF we’ve added are different heights, this is a problem. I need to fix these so that each embedded PDF can have its own height.
    4) Lastly, can you recommend a way to make these PDF pages responsive so that they look better on a smaller screen, ie. tablet, phone, etc.

    For reference, I am using the Go theme from Godaddy and everything is completely up to date.

    Thanks in advance for any assistance you guys can offer.

    • This topic was modified 2 years, 3 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Moderator bcworkz

    (@bcworkz)

    It’s impractical if not impossible to CSS style embedded objects. If the gutter and other elements are not literally part of the embedded object, then you have a chance of styling them. For the object itself, any styling needs to be done when the object is created.

    Why wouldn’t you simply embed PDF files using iframes? Then you have full control of everything around the embedded object. Or use the default editor’s embed block. Basically the same thing.

    Please do not offer to share access credential in these forums. I’m confident you’re not offering credentials where someone could do any kind of damage with the access. But others do so and it causes liability issues, so we need to not allow any kind of credential sharing. We don’t need people complaining “but you let jonphaseworx share credentials!” You’re free to publish a publicly accessible page that demonstrates the issues that doesn’t require credentials. Thanks for understanding.

    Thread Starter jonphaseworx

    (@jonphaseworx)

    Hi @bcworkz

    Thanks for your reply.

    I understand that CSS is unable to influence embeds. Creating the PDF seems to lock those gutters in, which is why I want to try and mask the edges somehow so it’s white all the way around.

    I’ve used iFrames and it has now solved the height issue, but I still need to mask the edges as per above.

    I am also still looking for assistance on the following points:

    2) For the menus, I would like the activate link to be the same maroon as in the logo (#800000) and remove the underline when hovering. I’ve played around with the CSS but I am not winning.

    4) Lastly, can you recommend a way to make these PDF pages responsive so that they look better on a smaller screen, ie. tablet, phone, etc.

    Thank you again.

    Moderator bcworkz

    (@bcworkz)

    Maybe to mask the gutter you could use a concept similar to image sprites? A background image with multiple elements is displayed through an aperture of sorts so only one element is visible at a time. In your case the background would be the PDF embed. Probably not a true background, but a lower layer. Thus only the left or right side is actually visible, masking the gutter and other side. You may need two occurrences of the same embed to manage the left and right elements. Should be OK performance-wise since both are the exact same source.

    As for responsiveness, that flies in the face of the entire concept of the PDF format. It’s a “feature” that display devices cannot corrupt the layout. I’m skeptical that it’s even possible.

    I believe there are PDF format conversion software packages out there that could possibly convert PDF to HTML on upload. Your client can stay with the entirely inappropriate format they are comfortable with, but the content served is actually normal HTML from the WP DB. This would be a far better approach IMO than fighting with PDF format.

    Thread Starter jonphaseworx

    (@jonphaseworx)

    Converting PDF to HTML might even negate the need for masking. Lemme look into this. Thanks mate.

    Thread Starter jonphaseworx

    (@jonphaseworx)

    We’ve opted to just forego the PDFs altogether. Which just leaves this that I need help with, please:

    2) For the menus, I would like the activate link to be the same maroon as in the logo (#800000) and remove the underline when hovering. I’ve played around with the CSS but I am not winning.

    2) For the menus, I would like the activate link to be the same maroon as in the logo (#800000) and remove the underline when hovering. I’ve played around with the CSS but I am not winning.

    Your menu’s styling is theme-dependent, and may even depend on the current configuration of your particular theme. So we’ll need to inspect the current page before we can offer any suggestions… either via custom CSS or a theme setting.

    But I only see a “Coming Soon” message on the page… so it’s impossible for us to help you with this at this time.

    Thread Starter jonphaseworx

    (@jonphaseworx)

    Hi George

    I’ve made the page publically viewable if you want to have a look. Once you’ve looked, I’ll set it back to the Coming Soon page.

    Thanks!

    Please try:

    .header__navigation a {
    color: maroon;
    }
    
    .header__navigation a:hover {
    text-decoration: none;
    }

    UPDATE:

    Sorry, I just read over your question again, and it seems for the color, you want ONLY the ACTIVE link to be maroon, so use this instead of the above:

    .header__navigation .current-menu-item a {
    color: maroon;
    }
    • This reply was modified 2 years, 3 months ago by George Appiah.
    Thread Starter jonphaseworx

    (@jonphaseworx)

    Ok awesome!

    Now I just need it so that when I click on “TEAM” for example, the link on the menu turns to a different colour.

    Can you help with that?

    Thanks again George. You are a lifesaver!

    Please see my edit above. My earlier code for the color affects all menu links, but the code under UPDATE only affects the currently displayed page. You may change the specified color to whatever you want.

    Thread Starter jonphaseworx

    (@jonphaseworx)

    Thank you!

    Thread Starter jonphaseworx

    (@jonphaseworx)

    All issues have been solved. Thanks to everyone for their assistance.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘PDF Embed Customization’ is closed to new replies.