Jump to content
Sign in to follow this  
Capman

CSS help

Recommended Posts

I have recently updated my site using CSS, but although it all works correctly on my computer, it is not working as it should when uploaded to Geocities.

My site.

The menu should look like this when normal:

Normal.jpg

The menu should look like this when hovered over:

Hover.jpg

The style.css code is as follows:

body
{
margin: 0;
padding: 0;
margin-bottom: 15px;
font-family: arial, helvetica, verdana, tahoma, sans-serif;
font-size: 80%;
color: #000;
background-color: #FFFFFF;
line-height: 180%;
}

a
{
color: #350374;
text-decoration: underline;
}

a:hover
{
color: #000000;
text-decoration: underline;
}

#headercontainer
{
width: 100%;
background: #CCCCCC;
}

#header
{
margin: 0 auto;
width: 760px;
height: 125px;
border: 1px solid #000000;
border-top: 0px;
border-bottom: 0px;
background: #FFFFFF url('header-background.jpg');
}

#header h1
{
margin: 0;
color: #FFFFFF;
font-family: helvetica, arial, verdana, tahoma, sans-serif;
font-size: 275%;
padding-left: 10px;
letter-spacing: -3px;
padding-top: 50px;
}

#menucontainer
{
width: 100%;
height: 28px;
background: #777777;
background-image:url('menu-background.jpg');
background-repeat:repeat-x;
}

#menu
{
margin: 0 auto;
width: 760px;
background: #FFFFFF;
border-right: 1px solid #95BC0E;
}

#content
{
margin: 0 auto;
width: 740px;
padding: 20px 10px;
border: 1px solid #B5B5B5;
border-top: 0px;
border-bottom: 0px;
background: #FFF;

}

#content h2
{
color: #666;
padding-bottom: 3px;
border-bottom: 1px solid #FFFFFF;
font-family: helvetica, arial, verdana, tahoma, sans-serif;
font-size: 200%;
letter-spacing: -1px;
}

#footer
{
margin: 0 auto;
width: 740px;
text-align: right;
color: #FFFFFF;
letter-spacing: 2px;
background: #000000 url('menu-background.jpg') repeat-x;
border: 1px solid #000000;
font-family: helvetica, arial, verdana, tahoma, sans-serif;
padding: 3px 10px;
}

The menu.css code is as follows:

#navcontainer ul
{
padding: 0;
margin: 0;
background-image:url('menu-background.jpg');
background-repeat:repeat-x;
color:#FFFFFF;
float:left;
width:100%;
border-left: 1px solid #777777;
letter-spacing: 1px;
}

#navcontainer ul li
{
display: inline;
}

#navcontainer ul li a
{
padding: 0.2em 1.5em;
background-image:url('menu-background.jpg');
background-repeat:repeat-x;
color: #FFF;
text-decoration: none;
float: left;
border-right: 1px solid #777777;
}

#navcontainer ul li a:hover
{
background-image:url('menu-hover.jpg');
background-repeat:repeat-x;
color: #000000;
}

The footer is suffering the same problem, but that should be corrected along with the menu.

Any ideas what I am doing wrong?

Maybe Geocities can't deal with 2 CSS files, I don't know.

I really do need to pull my finger out and get it hosted properly.

Share this post


Link to post
Share on other sites

Try changing your codes to this:

<link rel="stylesheet" type="text/css" media="screen" href="style.css" />
<link rel="stylesheet" type="text/css" media="menubar" href="menu.css" />

Some people also put their stylesheets into a /css folder.

Share this post


Link to post
Share on other sites

Nope, no good.

I am going to create a test Geocities site and try some CSS templates on there to see how they react.

If I find one that works then maybe I will be able to use it to get mine working somehow.

Any further help is appreciated.

Wheres Matrix when you need him? lol

Share this post


Link to post
Share on other sites

Ok, problem sorted now.

The two images that I was uploading for the normal menu and for when the menu was hovered had a .JPG suffix rather than a .jpg suffix.

Gotta love the way things are so case sensitive sometimes.

Share this post


Link to post
Share on other sites

Cool, glad you fixed it.

Nice site, though I think that its a shame its all freeware, you should split the sections up, because I find there are some really good products out there that only cost money.

Thanks Ultimate Predator, it is just something that I like to do to help others, along with all the other sites that I create. I am working on a wannabe model to let me create a site for her, but although she has agreed, she has not been forthcoming with any content for it, although the few pics that I do have already are possibly worth starting off with just to show her how it could look, which might spur her on a bit.

I created a site for a mates girlfriend that contained a bit of a biography, 3 galleries, and some birthday wishes, he gave her the link to it on her birthday and there was not a dry eye in the house he said. That in itself makes me feel good, I have learned from doing it, he was the best thing alive for supplying all the info and she was the happiest girl alive that day.

The Clean & Protected site was created with the intention of proving to people that they do not need to spend a penny to keep there computers in tip top condition.

Good choice to go with CSS.

CSS is awesome.

You got some errors to fix in the HTML code though;

* http://validator.w3.org/check?uri=http%3A%...ed%2Findex.html

The CSS validates good though.

CSS is awesome, the html file size now that CSS is used is approximately a third of what it was when the site was created in html alone. Admittedly the html file now has to call upon the CSS file each time, but it should still result in slightly faster loading pages.

The majority of the pages should validate ok without any problems, the only ones that will not validate are the ones that contain external links, because I have used the target="_blank" attribute on those.

This was after a lot of thought on my part and reading around on some other sites, where people had decided to use that option themselves rather than going down the road of using java script to achieve the same effect.

For some strange reason W3C have decided not to allow XHTML 1.0 validation if the page contains the target="_blank" attribute.

Edit,

Forgot to mention that the fact that it is hosted on Geocities means none of the pages will validate, but when uploading them from my computer to W3C the ones without the target="_blank" will.

Share this post


Link to post
Share on other sites

The Clean & Protected site was created with the intention of proving to people that they do not need to spend a penny to keep there computers in tip top condition.

You are right. But I still think there are some programs that are more advanced than others which unfortunately cost money. Outpost Suite for example. But, its a good idea. I might do a site similar to yours one day.

Share this post


Link to post
Share on other sites

CSS is awesome, the html file size now that CSS is used is approximately a third of what it was when the site was created in html alone. Admittedly the html file now has to call upon the CSS file each time, but it should still result in slightly faster loading pages.

The majority of the pages should validate ok without any problems, the only ones that will not validate are the ones that contain external links, because I have used the target="_blank" attribute on those.

This was after a lot of thought on my part and reading around on some other sites, where people had decided to use that option themselves rather than going down the road of using java script to achieve the same effect.

For some strange reason W3C have decided not to allow XHTML 1.0 validation if the page contains the target="_blank" attribute.

Edit,

Forgot to mention that the fact that it is hosted on Geocities means none of the pages will validate, but when uploading them from my computer to W3C the ones without the target="_blank" will.

Yes, CSS is awesome. :hello:

It only downloads the CSS file on the first visit to the page, then it is cached on the hard disk I supposed, so it just fetch the smaller HTML file, and loads the locally cached CSS file, for each page you browse to, so it should be faster and more bandwidth efficient.

You use XHTML 1.0 Strict DTD, I don't remember, but perhaps target="_blank" works with XHTML 1.0 Traditional or the XHTML 1.0 Frameset.

Also, note that Geocities is a very crappy webhost, heavily limited bandwidth, advertisement, etc. There are some good webhosts that offers more bandwith, have no ads, and some of them even offer MySQL and PHP support.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×