Precedente :: Successivo |
Autore |
Messaggio |
IZ5IOW Mortale devoto

Registrato: 15/08/09 11:43 Messaggi: 5
|
Inviato: 13 Gen 2010 14:17 Oggetto: Problema CSS con IE 6 |
|
|
Salve a tutti !!
Penso che sia la sezione corretta per questa domanda...altrimenti mi scuso in anticipo dell'errore.
Volevo sapere gentilmente come risolvere un problema: dopo aver realizzato un sito web personale utilizzando i fogli di stile (CSS) ho notato che quando apro le pagine con IE 6 mi trovo davanti tutti i vari "elementi" spostati (come elementi intendo: header, container, footer, ecc...). In poche parole non vengono visualizzati correttamente.
Ho provato con altri Browser (come ad esempio Firefox, Chrome ed Opera) e il problema non esiste, visualizzo le pagine tranquillamente senza cambiamenti, senza spostamenti vari e senza problemi in generale...
Ho già avuto altri tipi di problemi con IE6, ad esempio la "brutta" visualizzazione delle immagini con esetnsione .png. Fortunatamente ho risolto inserendo uno script (trovato in questo forum) nell' head dell'html.
Vorrei sapere se esistono metodi oppure degli script per risolvere anche il problema del CSS.
Grazie in anticipo per le vostre risposte, vi auguro una buona giornata a tutti. |
|
Top |
|
 |
freemind Supervisor sezione Programmazione


Registrato: 04/04/07 21:28 Messaggi: 4643 Residenza: Internet
|
Inviato: 13 Gen 2010 19:57 Oggetto: |
|
|
Ciao.
Il posto è giusto per postare la tua domanda!
Potresti postare il codice del tuo css così proviamo a guardarlo?
Ciao |
|
Top |
|
 |
IZ5IOW Mortale devoto

Registrato: 15/08/09 11:43 Messaggi: 5
|
Inviato: 14 Gen 2010 12:08 Oggetto: |
|
|
Ciao freemind !
Grazie della risposta, ecco il codice:
Codice: |
#body {
background-color: #FFF;
margin: 0 auto;
font-family: Times New Roman;
text-align: center;
}
#header{
margin: 0 auto;
width: 760px;
margin-top: 8%;
border: 0px;
position: center;
text-align: left;
}
#container {
width: 760px;
margin: 0 auto;
text-align: left;
border: 0px;
position: absolute center;
}
#navigation {
background-color:#CC9966;
margin: 0 auto;
width: 760px;
text-align: center;
font-family: Times New Roman;
font-weight: bold;
color: #FFF;
border: 0px;
position: center;
}
a:link {
text-decoration: none;
color: #FFF;
}
a:active {
text-decoration: none;
color: #FFF;
}
a:hover {
text-decoration: none;
color: #333;
}
#content {
width: 760px;
position: center;
font-family: Times New Roman;
text-align: left;
margin: 0 auto;
padding: 0px;
}
#paragraph {
position: center;
font-family: Times New Roman;
text-align: center;
}
#image {
text-align: center;
margin: 0 auto;
}
#counter {
position: left;
padding: 2px;
width: 100px;
height: 42px;
border: 0px;
}
#footer {
width: 760px;
position: center;
text-align: center;
font-family: Times New Roman;
border-top: 1px solid #CC9966;
margin: 0 auto;
}
|
E pensare che l'ho pure controllato con firebug, e con pagespeed di google... e i risultati sembrano buoni.
Beh speriamo di risolverlo questo problema
Grazie mille di nuovo, saluti. |
|
Top |
|
 |
freemind Supervisor sezione Programmazione


Registrato: 04/04/07 21:28 Messaggi: 4643 Residenza: Internet
|
Inviato: 15 Gen 2010 21:07 Oggetto: |
|
|
Guarda, senza provarlo non riesco a trovar nulla di strano.
Appena recupero una macchina win provo a far una paginetta e attaccarci il tuo css
ciao |
|
Top |
|
 |
freemind Supervisor sezione Programmazione


Registrato: 04/04/07 21:28 Messaggi: 4643 Residenza: Internet
|
Inviato: 25 Gen 2010 23:02 Oggetto: |
|
|
Ciao,
hai voglia di postare il sorgente di una delle pagine alla quale applichi il css e che poi si imballa con ie6?
Anche senza contenuto, l'importante per ora sono i div delle varie regioni in modo da capire come fai a boxare le varie parti.
Ad esempio:
Codice: |
<html>
<head>
<title></title>
</head>
<body>
<div id="contenitore">
<div id="testa"></div>
<div id="wrapper">
<div id="menu"></div>
<div id="contenuto"></div>
</div>
</div>
</body>
</html>
|
ovviamente usando i tuoi id nel posto giusto?
In pratica il template della pagina.
bau |
|
Top |
|
 |
IZ5IOW Mortale devoto

Registrato: 15/08/09 11:43 Messaggi: 5
|
Inviato: 26 Gen 2010 14:20 Oggetto: |
|
|
Ecco lo "scheletro" del codice: Codice: |
<html>
<head>
<title> Home </title>
<style type="text/css">
@import "percorso del file .css";
</style>
</head>
<body>
<div id="container">
<div id="header">
</div>
<div id="navigation">
</div>
<div id="footer">
</div>
</div>
</body>
</html> |
Con l'occasione posto un paio di links in cui vengono proposti degli script in grado di "fissare" gli elementi...li ho provati e sembrano funzionare in parte, cioè alcuni elementi vengono messi al suo posto mentre altri rimangono sparsi nalla pagina (aperta con IE).
Eccoli:
http://code.google.com/p/ie7-js/
http://dean.edwards.name
Il secondo link è il sito web dell'autore...gli script proposti sono per IE7 e IE8 ma hanno gli stessi identici effetti. Li ho provati sia con IE6 che con IE7 ma non allineano tutti gli elementi a dovere, come già detto in precedenza.
Grazie a tutti...saluti e buona giornata. |
|
Top |
|
 |
freemind Supervisor sezione Programmazione


Registrato: 04/04/07 21:28 Messaggi: 4643 Residenza: Internet
|
Inviato: 27 Gen 2010 01:07 Oggetto: |
|
|
Aspetta, non ho provato la roba però mi insospettisce il "center" che usi nel posizionamento di alcuni div.
Il valore "center" non è previsto per la proprietà "position"
Visual formatting model
Citazione: |
9.3.1 Choosing a positioning scheme: 'position' property
The 'position' and 'float' properties determine which of the CSS 2.1 positioning algorithms is used to calculate the position of a box.
'position'
Value: static | relative | absolute | fixed | inherit
Initial: static
Applies to: all elements
Inherited: no
Percentages: N/A
Media: visual
Computed value: as specified
The values of this property have the following meanings:
static
The box is a normal box, laid out according to the normal flow. The 'top', 'right', 'bottom', and 'left' properties do not apply.
relative
The box's position is calculated according to the normal flow (this is called the position in normal flow). Then the box is offset relative to its normal position. When a box B is relatively positioned, the position of the following box is calculated as though B were not offset. The effect of 'position:relative' on table-row-group, table-header-group, table-footer-group, table-row, table-column-group, table-column, table-cell, and table-caption elements is undefined.
absolute
The box's position (and possibly size) is specified with the 'top', 'right', 'bottom', and 'left' properties. These properties specify offsets with respect to the box's containing block. Absolutely positioned boxes are taken out of the normal flow. This means they have no impact on the layout of later siblings. Also, though absolutely positioned boxes have margins, they do not collapse with any other margins.
fixed
The box's position is calculated according to the 'absolute' model, but in addition, the box is fixed with respect to some reference. As with the 'absolute' model, the box's margins do not collapse with any other margins. In the case of handheld, projection, screen, tty, and tv media types, the box is fixed with respect to the viewport and does not move when scrolled. In the case of the print media type, the box is rendered on every page, and is fixed with respect to the page box, even if the page is seen through a viewport (in the case of a print-preview, for example). For other media types, the presentation is undefined. Authors may wish to specify 'fixed' in a media-dependent way. For instance, an author may want a box to remain at the top of the viewport on the screen, but not at the top of each printed page. The two specifications may be separated by using an @media rule, as in:
|
Preso da w3c.org
Quando avevo letto il css la prima volta mi era scappata questa cosa. |
|
Top |
|
 |
IZ5IOW Mortale devoto

Registrato: 15/08/09 11:43 Messaggi: 5
|
Inviato: 28 Gen 2010 16:44 Oggetto: |
|
|
Strano !!
A leggere l'articolo hai perfettamente ragione. Ho provato a toglierlo e a sostituire i valori, purtroppo il risultato è stato pessimo. Tutti gli elementi si sono spostati. Comunque voglio fare prove più approfondite con il "position" prima di scrivere altre cose...
Grazie per ora...saluti |
|
Top |
|
 |
|
|
Non puoi inserire nuovi argomenti Non puoi rispondere a nessun argomento Non puoi modificare i tuoi messaggi Non puoi cancellare i tuoi messaggi Non puoi votare nei sondaggi
|
|