Hi :),

I'm sorry if I've posted this in the wrong section, but I was just wondering if anyone could help me with my CSS code? For one of my uni modules, I have to design a simple website with 5 webpages and 3 CSS.

Basically, I messed my code up, when I tried to do something too complicated lol, and now my background colour won't show up in any of my HTML pages. Here is my complete CSS sheet that I'm working from:

.body {
background-color: #000000;
color: #000000;
font: 20px Eurostile Bold, sans-serif;
text-align: left;
}



.main {
width: 600px;
margin: 0px auto;
text-align: centre;
font: 20px Eurostile Bold, sans-serif;
}



.imagefloat {
float: centre;
margin: 0px 10px 10px 0px;
border: 1px solid #000000;
}

.textfloat {
background: #FFFFFF;
width: 210px;
float: centre;
padding: 10px 10px 10px 10px;
margin: 0 0px 10px 10px;
text-align: centre;
colour: #000000;
font: 20px Eurostile Bold, sans-serif;
}




.menu {
list-style-type: none;
margin: 0px;
float: left;
padding: 10px 10px 10px 10px;
overflow: hidden;
display:inline;
width: 95%;
font-weight: bold;
background-color: #00FF00;
text-align: center;
text-decoration: none;
text-transform: uppercase;
font: 20px AR Destine Thin, Eurostile Bold, sans-serif
}


a:link {text-decoration:none;color:#000000;}    /* unvisited link */
a:visited {text-decoration:none;color: #0000FF;} /* visited link */
a:hover {text-decoration:none;color: #FF0066;}   /* mouse over link */
a:active {text-decoration:none;color: #FFFF00;}  /* selected link */

My background colour was working yesterday, but obviously I've changed something and now it won't work! I have a feeling that there's a simple answer staring me in the face, but I just can't see it! Can anyone help :)?

Also, my menu isn't displaing in-line, it's still a block element....I've had this problem since the beginning of bulding my website, and I can't figure out what's wrong....is there something in my CSS code that's overriding the 'inline' instruction? Or have I just done it wrong lol?

Thank you for your help :)

REPattinson1

Recommended Answers

All 3 Replies

Check your reference to css file
<link href="load.css" rel="stylesheet" type="text/css" />
your path must be wrong.

Look out your .textfloat class. The spelling of color is 'color' not 'colour'. Remove the float property from .menu class your inline will work again.

Change text-align: centre; to text-align: center;

Their is no such things as float: centre;
only :
float:left; /float:right;/float:none/float:inherit;

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.