Visualizzazione dei risultati da 1 a 3 su 3

Discussione: css in sottocartella

  1. #1
    Utente di HTML.it
    Registrato dal
    Dec 2004
    Messaggi
    11

    css in sottocartella

    Ho una struttura simile:

    index.html
    css
    |___splash.css
    images
    |___top.png
    |___bottom.png


    Questo è il mio splash.css:
    codice:
    body {
    	width:100%;
    	height:100%;
    	background: url("images/top.png"), url("images/bottom.png");
    	background-attachment:fixed;
    	background-size:100%;
      	background-position: top center, bottom center;
      	background-repeat:no-repeat, no-repeat;
    	
    }
    e questo è il mio index.html
    codice:
    <!DOCTYPE html>
    <html lang="en">
    	<head>
    		<meta charset="utf-8" />
    
    		<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
    		Remove this if you use the .htaccess -->
    		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    
    		<title>index</title>
    		<meta name="description" content="" />
    		<meta name="author" content="ADMIN" />
    
    		<meta name="viewport" content="width=device-width; initial-scale=1.0" />
    
    		
    		<link rel="shortcut icon" href="/favicon.ico" />
    		<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
    		<link rel="stylesheet" type="text/css" href="splash.css" /> 
    	</head>
    
    	<body>
    	</body>
    </html>
    Mi succede questo:

    1. css interno: funziona perfettamente;

    2. css esterno stessa cartella: con
    codice:
    <link rel="stylesheet" type="text/css" href="splash.css" />
    funziona perfettamente;
    se le impostazioni css sono interne nella sezione

    3. css esterno nella cartella css: con
    codice:
    <link rel="stylesheet" type="text/css" href="css/splash.css" />
    non funziona.
    Perchè???? Cosa sbaglio???
    Io vorrei che il foglio splash.css stesse nella cartella css. Come posso fare?
    Help me please.

  2. #2
    Utente di HTML.it L'avatar di Prill
    Registrato dal
    Oct 2006
    Messaggi
    2,947
    Modifica il percorso delle immagini di sfondo nel css in ../images/top.png e simili

  3. #3
    Utente di HTML.it
    Registrato dal
    Dec 2004
    Messaggi
    11
    Fatto e risolto! Grazie.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.