I'm trying my hand at completely coding a new site in css, and im getting this. What am I doing wrong?
[edit]ok, even wierder: when I go to the actual page, I get this, which is what i want. Whats goin on?[/edit]
Well, Piersk, strange as it may seem, completely coding a site in CSS will give you a whole heap of nuthin - which is exactly what I get when I click on your two links.
Now remember, CSS is about style. What you want is content.
🙂
So if theres no content, then the browser will just show what looks like xml? Cos thats what I was gettin for the first link, but the 2nd was exactly what I wanted.
IF your looking at a CSS file then it SHOULD show up as text/plain. i think IE tries to DL it though............
I wasn't looking at a css file, I was looking at an XHTML file that linked to a css file and the browser was displaying it as though it was an xml file.
It's no now though. Him upstairs will only know why...
Morning Piersk
I'm at a new computer and with a newer version of IE - now I get exactly the same for both links, namely a couple of frames, a logo, the contact-me stuff, some dummy text and a picture that never loads (pierskarsenbarg).
Confused of Berlin
The images that are in the contact me box don't load? Hmmm.... They've always loaded pretty speedily for me... dammit.
Two more questions about css, then I'll drop the matter (maybe):
I thought css was supposed to be cross-broswer compatible. Why doesn't it come out the same? (or is that the $64,000 question that people are trying to figure out?)
If you go to the page, you will notice (in IE anyway) that the tops of the boxes are nicely level. However, if you were to look stylesheet, you will see that the top margins are not the same (as you would expect). In fact, most of them are -ve. Anyone care to explain this?
No, the contact images load, but the page never completes - the status bar states that a picture is loading (pierskarsenbarg) but then just sticks. The 'complete' status message never appears.
HTH
Norm
you want positioning not margins. I didn't look at your xhtml but I know that if you use divs css positioning is a low more browser dependent then if you use single celled tables no matter what my professor friend from cambridge says.
I'm not using tables or div tags, im using <p> tags with their margins set in the stylesheet.
It just doesn't make sense that the first one has margin-top: 0px and the next has something like margin-top: -448px
😕
I think you might find this page useful http://www.w3schools.com/css/css_positioning.asp
and BTW: I like the deisng - it's cool
Thanks, that link will come in very useful.
Originally posted by drawmack and BTW: I like the deisng - it's cool
Really? Thanks. it might seems quite sad, but that's actually made my day. My design skills are not fantastic (same as most coders I know), and that's put a smile on my face.
Thanks. 😃
One thing I've learnt...don't use too much CSS...some things are better left to HTML...
Originally posted by Merve One thing I've learnt...don't use too much CSS...some things are better left to HTML...
I do absolutely no formatting in html anymore. The reason is that eveything you leave in html is one more thing that cannot be changed globally from a single location.
Besides if you use xhtml then often your code won't validate if you use formatting in the html and if you don't use xhtml you should.
Originally posted by drawmack I do absolutely no formatting in html anymore. The reason is that eveything you leave in html is one more thing that cannot be changed globally from a single location. Besides if you use xhtml then often your code won't validate if you use formatting in the html and if you don't use xhtml you should.
What do you mean by that...in newbie language?
Originally posted by piersk The images that are in the contact me box don't load? Hmmm.... They've always loaded pretty speedily for me... dammit. Two more questions about css, then I'll drop the matter (maybe): I thought css was supposed to be cross-broswer compatible. Why doesn't it come out the same? (or is that the $64,000 question that people are trying to figure out?) If you go to the page, you will notice (in IE anyway) that the tops of the boxes are nicely level. However, if you were to look stylesheet, you will see that the top margins are not the same (as you would expect). In fact, most of them are -ve. Anyone care to explain this? [/B]
Originally posted by piersk The images that are in the contact me box don't load? Hmmm.... They've always loaded pretty speedily for me... dammit. Two more questions about css, then I'll drop the matter (maybe):
If you go to the page, you will notice (in IE anyway) that the tops of the boxes are nicely level. However, if you were to look stylesheet, you will see that the top margins are not the same (as you would expect). In fact, most of them are -ve. Anyone care to explain this? [/B]
Okay here we go...
<cssrant>
It looks different in IE because IE does the CSS box model incorrectly. THe short of it: the width of a positioned element in CSS is supposed to be the width of the CONTENT. The padding should not be included. IE includes this, which is wrong.
More info: http://www.tantek.com/CSS/Examples/boxmodelhack.html
As far as the crazy negative margins.... you aren't positioning your stuff absolutely. Try adding position: absolute; for the needed items in the CSS file.
</cssrant>
Originally posted by Merve What do you mean by that...in newbie language?
what do I mean by which part of it?
I use CSS for all layout and formatting. This way if I have a web-site that is 200 pages I can change any element of the design in a single file and it will change globally. On top of that I have already done complete redsigns just by writting a new css for a site - how cool is that?
html vs. xhtml http://www.w3c.org/MarkUp/
Thanks for that Goldbug. I was waiting for you to jump in 🙂
Originally posted by piersk Thanks for that Goldbug. I was waiting for you to jump in 🙂
Well, you did say the (one of several) magic word (CSS). 🙂
You took your time though. I posted that last night (my time) 😉