View Full Version : CSS page trouble
DarkSloth
01-19-2003, 07:31 PM
This is my first REAL attempt at CSS and I decided to get it as close as XHTML compliant as I could, but I'm in a bit of a pickle. I can't get my update div to be centered. I also want my topbanner div to be 100% width, is there anyway to do that without having to write "width: 100%"? Cuz when I write 100% I pretty much only get like 80%
The page also seems to have a lot of trouble with Opera 7.0. So can you guys help me with my troubles??? Also, if you see any crap code please tell me. I'm totally new at this. Thanks in advance. :)
URL : http://www.planetjesterz.com/altermon/beta/index.html
DarkSloth
01-20-2003, 11:15 AM
WOW!!! HAHAHAH, i suck dude... anyways, thanks a bunch dude. The code looks like a bajillion times better and now I can compare my sloppy code with your code. Thanx :thumbup:
DCElliott
01-20-2003, 11:28 AM
Need to put SINGLE QUOTES around list items with spaces:body {
MARGIN: 0px; FONT-FAMILY: 'Times New Roman', Times, serif;
}
(And not double quotes as some folks have been using.)
You should also close all properties with a ; even if it is the last one in a {} block.
XHTML really encourages us to be as formally correct as possible in creating well-formed, standards-compliant code.
DarkSloth
01-20-2003, 04:38 PM
Thanks DC, I always wondered if I should put that last ; or not.
DarkSloth
01-20-2003, 09:35 PM
I have 1 more question. Should I embed my stylesheets on the page, or should I link my stylesheets???
DCElliott
01-21-2003, 05:05 AM
I don't think there is a 'right' answer to your last question. In FP it is often more convenient to edit an embedded style sheet since you see the changes immediately. Once I have what I want, I move the stylesheet out to a *.css file and link it.
In any other editor lacking real-time preview, you might as well have the css open in an external file - often in Top Style if you are smart ;) make a change save and reload in your preview.
So it is really a matter of personal editing tools and style.
Just a point - when you move the css out, you don't need the <style> <!-- ... --></style> stuff any more.
MikeParent
01-21-2003, 08:27 AM
I like linking just because I use stylesheets to handle cross-browser display issues. One stylesheet file per browser.
Simplifies things somewhat.
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.