Hi CSSKid,
Im trying to create a web page that shows the content of a MySQL table where I have the personal data and the photos of my friends, using PHP/MySQL functions and CSS.
At first, the HTML code of my page was this:
HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style type="text/css" media="all">@import "css/master.css";</style>
</head>
<body>
<div id="page-container">
<div id="parte-superior">
Hola mundo
</div>
<div id="contactos">
<div id="foto">
<img src='uploaded/image.gif'>
</div>
<div id="datos">
Manuel Victor<br>Delgado Moranchel<br>670 3<br>moranitalia@hotmail.<br>Virgen del Amparo 13, 1º A<br><br>
<div id="foto">
<img src='uploaded/image.gif'>
</div>
<div id="datos">
Manuel Victor<br>Delgado Moranchel<br>670 3<br>moranitalia@hotmail.<br>Virgen del Amparo 13, 1º A<br><br>
</div>
</div>
</div>
</body>
</html>
and my CSS file this:
Code:
#page-container {
background: grey;
margin: auto;
}
#parte-superior {
height: 200px;
background: green;
}
#contactos {
background: white;
margin: auto;
width: 700px;
}
#foto {
width: 300px;
float: left;
background: yellow;
}
#datos {
width: 400px;
background: red;
}
but when i took the html to the CSS validator it told me ID's "foto" and "datos" was defined twice on my HTML file, and it was wrong...
So i changed my CSS file to this:
Code:
#page-container {
background: grey;
margin: auto;
}
#parte-superior {
height: 200px;
background: green;
}
#contactos {
background: white;
margin: auto;
width: 700px;
}
div.foto {
width: 300px;
float: left;
background: yellow;
}
div.datos {
width: 400px;
background: red;
}
After this last change, now I can not see the rules (backgrounds red and yellow) of classes "foto" and "datos" put into practice...
My question: Why i can not see the backgrounds ( red and yellow) with the second css and with the first css file yes??
|