I have a button. I added a translucent box to the button via :after. How can I get the translucent box to clip to the button?
Xavier Green
What languages would I need to learn to create a rental property reviews site? I’m guessing other than the code for the site itself, it’d have to have some kind of database backend to handle user accounts, property listings and reviews
Connor Walker
PHP is perfectly suited for this.
Don't listen to the JS shills around here. You would only get lost in fucking callback hells and dependencies mess.
A classic LAMP stack is all you really need.
You could try a nice PHP framework like Symfony or maybe Laravel if you are a beginner, with a classic database like MySQL.
So, in the end, you would need to learn : - HTML - a bit of CSS - Maybe a bit of Javascript - PHP - MySQL
Grayson Jones
>Web Development General >Don't listen to the JS shills
>You would only get lost in fucking callback hells ~confirmed for not knowing how to utilize and write modern JS
>dependencies mess. Don't composer and NPM function fairly similar? I talked with some user about JS/PHP dependency management a while ago and it turned out, that even the configuration files look almost the same between the two.
Ethan Robinson
Does anyone know of a javascript plugin that shows pdfs like this?
The problem was that my buttons weren't relatively positioned.
William Foster
Bros web design is so fuckin dull. I just wanna write some JavaScript but I gotta make a site first.
Eli Lopez
>building an upvote/downvote system in PHP a good idea or a bad idea /wdg/?
Colton Robinson
> implying modern web dev revolves around Javascript > implying Go, PHP, Java, Python, Elixir, and way more established battte-tested technologies don't exist > implying async paradigm makes server-side developement easier > implying a composer "vendor/" folder can be as messy and heavy as a "node_modules/"
Sebastian Baker
I always thought web dev wasn't for me since I worked with PHP, but then after fully embracing JS and Python, I realized it wasn't me that was shit, it was PHP.
William Johnson
>tfw you see the first tag you've spotted in years
Joseph James
but even Sup Forums uses them
Josiah Smith
Good idea user
Levi Carter
> implying modern web dev revolves around Javascript As if I said that. Though JS plays an ever increasing role, especially with the rise of those various frontend frameworks and Node. PHP may still be more common, but that's also because there is tons of legacy code and wordpress work out there. > implying async paradigm makes server-side developement easier Compared to only using sync methods and syntax? Yes it obviously does with the nature of how the JS event loop functions. Especially, when you can now even write it in almost the same way as sync code using Async/Await syntax. > implying a composer "vendor/" folder can be as messy and heavy as a "node_modules/" Don't know about that really, but yeah. Modules depend on modules, that depend on other modules. Depends on what you feel is messy in that regard.
Tyler Long
>general about JS and PHP
get off my Sup Forums
James Hughes
This is web dev general, what were you expecting ? Chats about C and Assembly ?
Thomas Rivera
Bros what is new in the web development world this week
Aiden Rivera
oh yeah because smartphones are so much better
Sup Forums is a great example of what not to do tbqh
its why i consistently recommend python as the beginner starting point
Juan Thomas
Python is really great since it has so many uses, from networking, data science, bioinformatics to web dev. There are numerous fields for Python and it is a decent programming language as opposed to PHP which is not even that, it's a scripting language.
PHP is all right for small sites, simple contact forms and so on. PHP is the language for the poor who don't know any better than WordPress and need a cheap shared hosting package to go with it.
Brody Gonzalez
Yep, more than that though, I think a lot of python learning materials tend to be really focused on teaching people who know nothing about programming. Automate the boring stuff is a great example. Or sites like fullstackpython that do a phenomenal job at visualizing how everything works.
Brody Rogers
out of all the threads, you complain about one where people are actually trying to learn and build things and not just shill the latest iProduct or show their arch desktop
Hudson Collins
>>>/dpt/
Anthony Morgan
web then: >request an URI >get served a resource it identifies
web now: >request an URI >get served 5MB of javascript your browser needs to execute in order to, 68 XHR requests later, assemble an ephemeral, unbookmarkable, unsaveable "resource" >fuck you grandpa, it's not a website, it's a web """""app""""" crafted with love by artisans
Logan Fisher
web then wasn't ever that easy lmao but nice try
Dylan Gomez
Yeah, I loved exclusively using low-level html tags for everything and enjoying wildly different behaviors across browsers.
Landon Carter
that's because web devs wanna kill native applications, since it would be more convenient for them (less languages to learn). whether they're being successful is another story, but let's see where this goes.
Ayden Ross
wake up aniki ;_;
Angel Watson
But there's already react/etc Meh, it was in the early-mid 90s
Brayden Jones
I didn't really "get" react at first, and I'm sure I'll eventually move on to some hot new functional framework, but god damn, life is so much easier with react.
Gabriel Ross
who in their right mind would want to jump through iOS store requirements and have a separate android codebase vs a web-based app?
Charles Young
It's not about languages to learn, only beginners really care that much about languages, everyone else learns new languages (and works with them) all the time. Having to develop and maintain multiple codebases for no real reason is a tremendous time and money drain.
Once PWAs really take off (soon now that apple is finally on board) we're in for a good time seeing as like 95% of current "native" apps don't need to be native whatsoever. Electron can finally die too for that matter.
Alexander Gray
How do i centre align a tag in HTML?
Bentley Reyes
font tags are outdated. wtf
Robert Howard
So my page is made up of two columns. The first column is 241px. My second column takes up the rest of the screen. I've tried to do this a few ways, one using JS and one using CSS, but they've failed me both times.
In CSS, I tried having the second column's width equal to calc(100vw - 241px) but the second column ends up being too wide and falls to the second row.
In JS, I put a call to the function named setColumnWidth in the $(window).resize() function, which works a bit better than the CS option, but occasionally, the screen is resized in such a way that it messes up and the second column is resized to a number slightly less than what it should be (like 10 pixels less)
help
Benjamin Walker
How else would i change the font, i started learning HTML 2 days ago
Adrian Jenkins
>but the second column ends up being too wide and falls to the second row Don't use floats for positioning, just make both columns absolutely positioned, with top: 0 for both and left:0/right:0 for the two columns respectively.
Does exactly what you want without any extra JS or css calculation bullshit
Robert Powell
Could someone tell me what makes PWAs special? From what I understood it's a mix of apps and sites, and apparently users can access info offline. Is there something I'm missing?
Fucking hell i literally dont understand shit here, Should i be learning CSS alongside HTML? Also i'm literally just using notepad and saving files as a .htm and opening them in chrome
Daniel Perez
> Also i'm literally just using notepad and saving files as a .htm
Oh, okay. It was all a joke. Nothing to see here guys.
Whats the best editor, was thinking of going with MS Visual
Elijah Evans
I went through the flexbox froggy tutorial and it didn't really teach me what I'm looking for, maybe ill draw a picture
Jacob Nelson
>i'm literally just using notepad and saving files as a .htm kek
if you're for real, good luck on your journey, user
Eli Williams
>notepad and saving files as a .htm seriously, what resource are you using to learn that stuff?
You can and probably even should learn HTML and CSS side by side. Learn how to define parts of your site with different tags and then learn how to style them in the way you want. Once you have that down you can also add JS to the mix and start to make things interactive, but don't rush it.
what this user posted -> I would recommend you install a good editor, that at least gives you proper syntax highlighting. Check out "vs code", "atom" or "sublime". My choice is vs code, but use what looks most appealing to you.
Isaac Johnson
VSCode is comfy and no learning curve.
Connor Gomez
i am not joking i am genuinely using notepad, whats wrong with that? helps you learn from scratch
Austin King
Laugh all you want.
One day, you're going to work for me faggot
Owen Barnes
well you have 2 columns. So you have a wrapper with display: flex; and 2 divs inside it, one with a fixed width of 241px and another with flex-grow: 1; that will take up the rest of the space.
Post a jsFiddle if you want, if you are stuck with that.
Lincoln King
Pick one you like most, but I think for beginners VSCode is the safest due the amount of hand holding. Although I think brackets and atom are also safe choices.
Joseph Garcia
No, no, don't use that. You should use Adobe Dreamweaver, that's what all the professionals use.
Sebastian Martinez
More power to you, user. I'm not trying to bully, just saying wow... you really are starting from scratch.
Jackson Hill
no it doesnt. That's like saying you are using a rock instead of a hammer as a tool "because it helps you learn from scratch"
Josiah Powell
...
Evan Lewis
oh shit, it worked, thanks user!
Christopher White
I recently escaped North Korea, so all this shit is new to me.
Levi Reed
don't you start with this shit now
Logan Gutierrez
You're not doing yourself any favors. It's just more typing and more stumbling because you don't have syntax highlighting/checking, autocomplete, or indentation.
Sebastian Butler
fuck i feel like an idiot, a whole year of webdev and I just realized you can put the media rule in the link to the CSS like:
Chase Perez
I hope you bundle it all into one file for production. Try to have as little requests as possible.
Jeremiah Butler
Usually, because there is still a great deal of shared markup, I'd put the css in the same file and use media queries in the css. Or at least be linking a base file, but it could add more abstraction than it's worth.
this, too
Aaron Sanchez
Yea, I do that, but having that giant ass CSS file has always been a pain to manage, so knowing this will help a lot.
Nathan Lewis
>Try to have as little requests as possible This is pointless with the advent of HTTP/2
Jordan Watson
>giant ass CSS file Unless you're working on an actual massive project, a giant css file is probably due to a lot of redundant styles. Can't really fuck up @media at the bottom of the sheet.
Gavin Hernandez
only the deployed output should be bundled. When you are working on the source you still have all your individual smaller files to work on.
William Cox
Do any of you guys have personal websites/blogs?
Evan Johnson
fucking soyboys ruin the programming industry.
Ayden Ward
Yes, I've posted it here before. I deleted the digital ocean droplet that it was running on like a week ago tho because I didn't update it for months. The site and the database is completely saved so if I feel like making my site live again, I can easily.
Levi Nguyen
>only the deployed output should be bundled. I prefer using webpack dev server, it's super comfy
update your js and your page refreshes
Connor Nelson
so do I, but you were talking about it being harder to manage, which implied, that you were working on a single huge file somehow.
Dominic Price
fyi the browser still ends up loading both stylesheets, no matter which one is being applied. Although I'm not sure whether or not they prioritize the one that's going to be used initially.
Jose Morgan
i could be wrong, haven't tried it, but you could probably use if statements in PHP or AJAX to load only one CSS at a time and the load the other when the conditions are met.
Jonathan Watson
that wasn't me. but you're right about the suspicion of user using a giant file somewhere.
Nolan Wright
I will never get over how much of a fucking mess web languages are. PHP, JS, HTML, CSS -- all are complete messes.
Lincoln Wright
and for that user's edification, the source-map npm can be used to maintain the semblance of dealing with separate files while still leveraging webpack and the dev server
Anthony Myers
post an example and start a discussion. (no PHP, that's easy mode, and no "[] + {}" memery)
es6, sass, and shit like react eases this massively
Xavier Ward
>soy humor
Ryan Parker
How about calling functions by resolving strings because of a historic lack of first-class functions? $arr = array(1, 2, 3); function square($x) { return $x * $x; } $arr = array_map("square", $arr); // $arr == [1, 4, 9] Is that enough of a mess for you?
James Young
I never do any real lifting in PHP because this is CURRENT_YEAR, but holy shit is that for real?
Nicholas Hall
lel
Evan Green
>holy shit is that for real? Yes. PHP actually has first-class functions nowadays, but that used to be the only way to "pass" a function to another function. Nowadays functions can accept a "callable" parameter, which is usually just a function, but for historical reasons can be a string that resolves to a function name.
PHP is full of garbage like this.
Asher Evans
huh, that's interesting.
Carter Edwards
ah, so it's vestigial
Parker Reyes
Yeah, you could definitely do that. Also there's always the option to redirect to a mobile version of the page and return a different set of resources, based on user-agent. This is what Twitter does, but they probably have more of a justification for maintaining an entirely separate mobile UI than most other sites do.
Sebastian Carter
this it's unlikely you'd have a mobile UI that didn't have a significant common base with a different media
Austin Richardson
I should mention that passing a function is still shit in PHP and the "function_name" calling convention is still used today and is not considered legacy. This will not work, because functions are not variables $arr = array_map($square, $arr); That would resolve $square to undefined, apply no mapping, and assign an unmodified $arr back to $arr
This however, WILL work $arr = array_map(square, $arr); But will also throw a notice. PHP will see the token 'square' that it doesn't recognize, and assume it's a previously defined constant. Because it's not, it will fail to resolve the constant to a value, and will default to resolving the constant as a string of its name (yes, typing random undefined gibberish anywhere in PHP code is automatically converted into a string as long as it can't be parsed as something else), throwing a notice in the process, and then that string will trigger the old string-function calling convention.
The only other way to do this that isn't abhorrent is to use an inline function $arr = array_map(function($x) { return $x* $x; }, $arr); which works fine and doesn't throw anything.
Ian Robinson
>*covers ears* >LALALALALALALALA I can't hear you.
Ryan Jackson
honestly, there's nothing wrong with just passing just the word "square" since ( ) would be an arbitrary addition if you already differentiate variables with $