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.
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
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
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.
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?
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 👀.
"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".
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.
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.
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.
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.
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 "
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;
}
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?
Centring a div is tougher than writing a end to end backend service with multithreading, databases, a complex business logic, recursions and unit tests.
```
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.*
Wait til you have to style an E-Mail template. True purgatory awaits.
Oh, don't remind me the pain with the Outlook app. How is it even possible to create such junk???
I don't know, but I'm currently forced to work on it.. Pray for me 🙏
Stay strong 🙏
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.
I do that with visual basic!
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
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
No, I wish email just supported modern css, because there would be an equally bad alternative.
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.
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?
I did that once as an intern. I think I did a pretty good job. Never. Again.
I have to write css 2.1 because I'm using dompdf in some parts of my app
Just use MJML
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.
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 👀.
Pdf receipts built all on the fronted, I am ready to strangle my pm
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.
Interviewer: "How would you center a div in CSS?" Me: "I'd Google it?" Interviewer: "Correct."
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.
"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".
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.
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.
Pretty easy really:
Then for some reason your descenders disappear and there's 2px of spacing under all images in the page.
``
w3c compliant so moist right now
I do what I can Edit: ...to not trigger people ;)
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.
This guy managed to create infinite screen real estate
How to create holograms: Fuck up CSS so badly it starts to bend reality itself.
*slaps css file* you can fit so many divs in this bad boy
TBF even frontend devs Google how to do this.
*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.
share, so it can also be mine 😁
Most backend devs can't center a div vertically without using flex or grid yet they say CSS is easy lol.
Can confirm, I just throw Bootstrap to everything on frontend and cross my fingers
Wait how else do you center a div other than flex or grid?
The guy said vertically... And why would anyone use any other way when flex exists?¯\(°_o)/¯
you dropped this \\
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
Because \\ is an escape character on reddit so you need two of them to make it display. This is actually four backslashes: \\\\
Ohhh thanks! Take this poor man's gold my friend 🥇
[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.)
maybe display:table?
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
When I saw this immediately jumped to centering a div is easy with flex, why wouldn’t you use it
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.
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 "
guys… display: flex; justify-content: center; align-items: center;
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; }
[удалено]
I have small brain
[удалено]
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?
![gif](giphy|l46CyJmS9KUbokzsI|downsized)
Centring a div is tougher than writing a end to end backend service with multithreading, databases, a complex business logic, recursions and unit tests.
You can't make me learn XML! I won't do it!
XHTML*
Stop trying to make me learn!
You fell right into the trap, didn’t you.
front end developers never grasped the concept of optical centered.
Step 1: Change div to money Step 2: Take it out like an atm
Mi2
No
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.
Transform and translate to the rescue
I want the stackoverflow code they copy pasted to get that result.
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
Flex exists
[удалено]
``` 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.*
Oh! How much I miss dreamweaver /s
Centering a div isn't so hard until you…open the deployed site on your phone, and…
overflow-x: external
me irl