Im working on a css website and none of the functions are working. I validated that the information is right and the Version of internet explorer I am using is 6.0. In fact the only place that the CSS is being recognized in is Microsoft FrontPage in normal view and not preview. What is wrong?
Your first problem is FrontPage
I absolutely hate using front page because of all the stupid Microsoft rules and limits they require you to use. It might take you a lot longer, but I’d probably hardcode with notepad…thats usually what I do first. If you want an HTML editor, I’d reccomend getting your hands on a copy of Macromedia Dreamwaver. I use dreamweaver for all my webstuff and it’s fairly easy to use and learn.
I am handcoding it. The only thing that will actually recognize my css is Frontpage. Internet Explorer simply refuses to. I wonder if it has anything to do with my school’s computer. Its really really freaky.
Copy the code here and ill take a look at it…and if you are using external CSS, show that page and the .html file
I’ve had serious problems with css in the past. This may sound crazy, but it’s possible your computer isn’t recognizing the file extension. I’ve had problems with this- even with relatively new computers that have fairly new software. If it’s an external file, try placing the code inside the <head></head> commands of the page. If that works, it may just be the computer/OS/software- ie, things outside your control. If not, you probably forgot like one semicolon somwhere that’s screwing it up. =)
I’ll take a look too if you post it.
And what DJ Fluck said-I applaud your handcoding. Never use FrontPage!! (not that we don’t all love Microsoft…)
Chances are that you made a really small syntax error in your HTML code’s link, or possibly (but unlikely) in the CSS file itself. FrontPage (and IE) tends to be very forgiving of mistakes or bad code, which is why this is probably the case.
If you have this page uploaded on a web server, I’d be happy to take a look. It’s likely that the problem lies in your <link> or <style> tags, or their attributes though, so double-check them first.
Personally, I think you should try to see if Netscape, Mozilla, or a browser of that sort can view the page also. IE isn’t very friendly on reading CSS files I believe.
I second the motion to have you show us the code.
And what DJ Fluck said-I applaud your handcoding. Never use FrontPage!! (not that we don’t all love Microsoft…)
I was handcoding it. But goosh darn it there is something wrong with my school’s computers. It simply does not display the fact that there is any css. The only program that actually displayed my css was Frontpage?? There is no errors as I checked on a validator because I couldn’t figure out what was happening. It works on my computer now. Could it be the fact that I was using Microsoft Word to type it and not notepad?? Sorry I did not post this sooner I feel asleep.
<html>
<head>
<style type="text/css">
body {background-color:black; width:800px; height:600px;}
.rightnavbar {width:150px; height:200px; border-style:ridge; position:absolute; left:0px; top:70px}
.topnavbar {width:800px; height:68px; position:absolute; left:0px; top:0px; border-style:ridge}
</style>
</head>
<body>
<table class="topnavbar">
hello
</table>
<table class="rightnavbar"
work dam u work
</table>
</body>
</html>
Hello,
Good job with the hardcoding! What text editor are u using? (If you say vi or notepad, I will adore you, living in the dark ages before syntax highlighting).
CSS tends to be very… interesting when coupled with Frontpage. Or Dreamweaver. Trust me, the 98.4mb trial is not worth downloading. Hardcode all the way!
I would recommend you try another OS and/or web browser. Usually fixes CSS problems for me.
Good luck.
A quick look at your code suggests that the CSS is working to some extent. I’m seeing stuff on both IE6 and Gecko. Also, you might want to get something that highlights syntax. It would have shown the fact that you didn’t close one of your <table> elements. If you tell us what you want to achieve with the file, I could whip something up for you.
Haha I took a nap today too. Way to go. =)
Ok, let’s see here. Someone already pointed out that you didn’t properly close one of the table commands.
<table class="rightnavbar"
work dam u work
</table>
Here’s what happens: I tried linking to the style sheet (saved it as a .css) and everything but the background color works. confused I tried changing it from “black” to the hex code (#000000) but that didn’t help. So I’m not really sure what’s up in terms of how different browsers/OS’s are working.
With the embedded style sheet (either way, actually), the tables show up- but you need to open and close the <TR> and <TD> tags for the text to show up in the right place- otherwise it ends up outside your tables and the tables then change position to accomodate, so all your .css positioning is pointless.
Also, one piece of unsolicited advice. =) You may want to try playing around with div layers and seeing if that helps. They may be easier to work with, depending on what you’re trying to do. Your style sheet will work the same way, but you can just change your code from <table class= “topnavbar”> to <div id= “topnavbar” class= “topnavbar”>. I think you may be able to do more with the css then. I’m not totally sure, but it’s probably worth playing around with.
Hope this helps. I think I fixed some stuff but I’m not sure I exactly answers your original question. Maybe if we knew what OS and browser you were using on the school computers compared to what we are all using we’d be able to figure out what does/doesn’t support what you’re trying to do and possibly fix it.
This works for me:
<html>
<head>
<style type="text/css">
body {background-color:yellow; width:800px; height:600px;}
.topnavbar {background-color:red; width:800px; height:68px; position:absolute; left:0px; top:0px; border-style:ridge; border-width:10}
.rightnavbar {background-color:blue; width:150px; height:200px; border-style:ridge; position:absolute; left:0px; top:70px}
</style>
</head>
<body>
<table class="topnavbar">
<tr>
<td>
hello
</td>
</tr>
</table>
<table class="rightnavbar"
<tr>
<td>
work dam u work
</td>
</tr>
</table>
</body>
</html>
Your problem isn’t with your css, but with your html.
I’ve attached screenshots of 3 different browsers rendering of gwross’s code and your code.
Don’t know if this is an issue or not, but depending on how you saved the Word file, it might have thrown in wacky formatting codes. But yeah, other than that, just fix up the HTML…
and in regards to the background-color not working… it’s 'cause it should be background-colour [/joke]
And does calling the width/height properties for the body tag actually do anything?
It shouldn’t make a difference at all. As long as you saved it as plain text and can open the source with notepad, it makes no difference. A browser parses for stuff it understands, i.e. tags.
They both work most of the time, though the correct way in CSS is to spell colour incorrectly. I believe “background-colour” is also acceptable though, and browsers don’t seem to mind it.
Actually it does, but you’re getting into some more advanced stuff there. For the purposes of this page, it makes little difference.
Sorry I was really bored when I was working with the html and I knew that the table tags was not the way to go. It was such a freaky thing though. My schools computer does not accept that my css coding. Its got to be some but with their computers.