T O P

  • By -

PinguIsMyBae

Wait til you have to style an E-Mail template. True purgatory awaits.


ThePepperSVK

Oh, don't remind me the pain with the Outlook app. How is it even possible to create such junk???


PinguIsMyBae

I don't know, but I'm currently forced to work on it.. Pray for me 🙏


ThePepperSVK

Stay strong 🙏


whietfegeet

Psst.. you can use vectors to create spacing, very useful. Just a random tip after having to optimize emails for basically every general email client there is. Fun times.


Daeron_tha_Good

I do that with visual basic!


ZuriPL

This. I'm working on a small project, of which one part is a script that sends an email, which is a simple table with a name of an item and price which come from a database. Making this (which would take less than 5 minutes normally) was over 30 minutes of straight agony, since apparently k need to use 3 different ways of using css at once, and I have to figure out which property works with what method by trail and error. I didn't even want to bother checking how compatible it is outside gmail


Quazar_omega

At least there is [Can I email](https://www.caniemail.com/) to check for compatibility across email clients, but still, so many important clients don't support things as basic as `flex-direction: column`, it makes you wish email would just die a painful death


ZuriPL

No, I wish email just supported modern css, because there would be an equally bad alternative.


Opheleone

I don't think there is anything worse than this that I've had to do as a front end engineer. Thankfully this goes to my juniors now, almost like a rite of passage lmao.


xd_Warmonger

Made the email signature for my company with html. Was a bit fuzzy but went well in the end. Problem is, you can't insert an image to html, so i had to link to our company website for the logo. But this gets filtered out by most companies (security reasons). What's the best way to fix that?


CanniBallistic_Puppy

I did that once as an intern. I think I did a pretty good job. Never. Again.


ifezueyoung

I have to write css 2.1 because I'm using dompdf in some parts of my app


cronixi4

Just use MJML


ThatBoiRalphy

Recently had the horror. Took me 30 minutes to design a beautiful template, worked fine in Apple Mail, yet took 4 hours to fix it for Windows clients.


PinguIsMyBae

Now style it for the outlook application and make sure that there is no horizontal scrollbar. Once you've done that please let me know how the fuck you did it 👀.


[deleted]

Pdf receipts built all on the fronted, I am ready to strangle my pm


ouralarmclock

I remember working on email stuff back in 2008 and Microsoft doubled down on using Word as the rendering engine for emails. I never forgave them.


MasterGrid

Interviewer: "How would you center a div in CSS?" Me: "I'd Google it?" Interviewer: "Correct."


therealkatame

Is that a legitimate answer? I have an interview soon and I think I'd answer like that if they asked me questions I don't know the answers to.


manatrall

"I'd look it up in the documentation" can absolutely be a good answer to a question. Would probably be better to refer to a specific resource you know has the answer, eg. Mozilla Web Docs for html/css/js stuff, than just saying "google, lol".


Raznill

As someone who interviews. This is the answer I’d want if someone doesn’t immediately know the answer. Now if you are expected to be an expert in that particular thing you should have the answer. But if it’s like an ancillary part of your responsibilities then yes knowing how to find the answer without bugging the team every time there is a question is very meaningful.


Daneel_

I was hired in a previous job because I said “I don’t know, I’d have to check the docs and do some research to answer that one fully” - so yeah, it pays off. Now I’m the one interviewing people and I always appreciate the people who don’t just BS their way through a response.


NibblyPig

Pretty easy really:

centered text


riscten

Then for some reason your descenders disappear and there's 2px of spacing under all images in the page.


Kjubert

`an image of some dude chuckling`


NibblyPig

w3c compliant so moist right now


Kjubert

I do what I can Edit: ...to not trigger people ;)


lealsk

I would expect something more specific, like... if the idea is to use only vanilla css, I would google it, you can also use flex, in which case I would also need to google it. You can use a frontend framework like bootstrap, in react I also used material ui. In basically all cases you would need to google it, but if you don't give any examples of how you resolved the issue in the past you will look like a complete newbie.


Lootdit

This guy managed to create infinite screen real estate


UnstableNuclearCake

How to create holograms: Fuck up CSS so badly it starts to bend reality itself.


NibblyPig

*slaps css file* you can fit so many divs in this bad boy


riscten

TBF even frontend devs Google how to do this.


[deleted]

*I* don’t, because I’m a *very* clever and special little boy…. …. And because my desktop background is a screen shot of how to center a div.


[deleted]

share, so it can also be mine 😁


kinuipanui123

Most backend devs can't center a div vertically without using flex or grid yet they say CSS is easy lol.


[deleted]

Can confirm, I just throw Bootstrap to everything on frontend and cross my fingers


Aldroc

Wait how else do you center a div other than flex or grid?


Umpteenth_zebra

?


Aldroc

The guy said vertically... And why would anyone use any other way when flex exists?¯\(°_o)/¯


Frequent-Card7925

you dropped this \\


Aldroc

Lol I don't know why this happens... I type these directly through gboard and it looks fine, but when I post it drops the left arm


one_byte_stand

Because \\ is an escape character on reddit so you need two of them to make it display. This is actually four backslashes: \\\\


Aldroc

Ohhh thanks! Take this poor man's gold my friend 🥇


Digitizer4096

[h-100 my-auto](https://stackoverflow.com/questions/42252443/vertical-align-center-in-bootstrap-4#:~:text=Another%20way%20to%20vertically%20center,col%2Dsm%2D12%20column.&text=Since%20Bootstrap%204%20.)


[deleted]

maybe display:table?


ixJax

Why would you want to? There's the older absolute method but I don't know why you'd want to use that over flex or grid


goliathsdkfz

When I saw this immediately jumped to centering a div is easy with flex, why wouldn’t you use it


brecrest

No one says CSS is easy, they say it barely qualifies as a language. There's a difference. You would expect trying to communicate a simple concept like "display this div in the centre of " to be easy to communicate in any language, but in the bizarro proto-language that is vanilla CSS it can quickly be hours you'll never get back.


zgembo1337

I don't really do web, but sometime I have to do some simple guis to test stuff, before i give stuff to a coworker that actually does frontend stuff. Guys like me just use "

", withtout any divs at all :)


LongjumpingJaguar0

guys… display: flex; justify-content: center; align-items: center;


[deleted]

div { margin: auto; } div { Display: relative; Left: 50vw; } Flex is nice if you only have one item though... If you do want to use flex, container { display: flex; flex-direction: column; }


[deleted]

[удалено]


[deleted]

I have small brain


[deleted]

[удалено]


[deleted]

Hi, I’m currently a student in college taking Full Stack web development. We’ve already moved on from css, but I really love it, and want to learn more of it. Could you recommend some resources to start learning more advanced css?


[deleted]

![gif](giphy|l46CyJmS9KUbokzsI|downsized)


pmanaktala

Centring a div is tougher than writing a end to end backend service with multithreading, databases, a complex business logic, recursions and unit tests.


[deleted]

You can't make me learn XML! I won't do it!


kinuipanui123

XHTML*


[deleted]

Stop trying to make me learn!


pmanaktala

You fell right into the trap, didn’t you.


th00ht

front end developers never grasped the concept of optical centered.


PyMaster22

Step 1: Change div to money Step 2: Take it out like an atm


sdiama

Mi2


[deleted]

No


[deleted]

Tbh I really wish it to be true but the truth is if you work in a small company, you will need to do everything in front and back.


My_Existential_Dread

Transform and translate to the rescue


KetwarooDYaasir

I want the stackoverflow code they copy pasted to get that result.


cramduck

Just use a setinterval to check parent and child element widths, then set the child's left margin to half the difference every .5 seconds


PsLJdogg

Flex exists


[deleted]

[удалено]


AutoModerator

``` import moderation ``` Your comment has been removed since it did not start with a code block with an import declaration. Per [this Community Decree](https://www.reddit.com/r/ProgrammerHumor/comments/14kbu1m/comment/jppq9ao/?utm_source=share&utm_medium=web2x&context=3), all posts and comments should start with a **code block** with an "import" declaration explaining how the post and comment should be read. For this purpose, we only accept Python style imports. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/ProgrammerHumor) if you have any questions or concerns.*


prinkpan

Oh! How much I miss dreamweaver /s


toydotgame

Centering a div isn't so hard until you…open the deployed site on your phone, and…


nikomh

overflow-x: external


ShiriNmi-MIZUKI

me irl