Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

196
Views
Javascript, Wrapper & Content hicieron que el encabezado desapareciera en Mi servidor http://localhost:3000

La barra lateral, el feed y los widgets del encabezado desaparecieron repentinamente del host local cuando agregué el contenedor y el contenido, ¿a dónde fueron?

Aquí está mi código:

 import { constants } from 'buffer' import type { NextPage } from 'next' import Head from 'next/head' import Image from 'next/image' const style = { wrapper: 'flex justify-center h-screen w-screen select-none bg [#1520b] text-white', content: 'max-w-[1400px] w-2/3 flex justify between', } export default function Home(){ return ( <div className = {style.wrapper}> <div className = {style.content}> <h2>Sidebar</h2> <h2>Feed</h2> <h2>Widgets</h2> </div> </div> ) }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Esto es lo que sucede: agrega el text-white al wrapper para que todo el texto sea blanco y el color de fondo predeterminado también sea blanco para que la página se vea como si estuviera vacía.

también el bg [#1520b] el valor aquí no es válido, debe tener 3 o 6 letras y debe conectarlo con bg usando - como este bg-[#1520b9] , pero tampoco funcionará porque no puede use valores arbitrarios en viento de cola con reacciones como esta. así que te recomendaría que lo muevas a un estilo en línea como este:

style={{backgroundColor:'#1520bf'}}

y lo mismo ocurre con max-w-[1400px] :

style={{maxWidth:'1400px'}}

Así que tu código debería verse así:

 import { constants } from 'buffer' import type { NextPage } from 'next' import Head from 'next/head' import Image from 'next/image' const style = { wrapper: 'flex justify-center h-screen w-screen select-none text-white', content: ' w-2/3 flex justify-between', } export default function Home(){ return ( <div className = {style.wrapper} style={{backgroundColor:'#1520bf'}}> <div className = {style.content} style={{maxWidth:'1400px'}}> <h2>Sidebar</h2> <h2>Feed</h2> <h2>Widgets</h2> </div> </div> ) }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!