|
| |
|
|
lilblackgirl
Posts: 288 Joined: 5/16/2002 From: Status: offline
|
stylesheet layout - 3/10/2004 11:14:32
is layout a user's preference or is there one that that actually functions better? this is what i mean (and thanks to gorilla for the examples): like this: body { background-color: #F0FFF0; color: Black; border: 0px; margin: 0px; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;} or like this: #menu { position: absolute; width: 150px; top: 180px; text-align: left; font-size: small; } either line by line or all on the same line. thanks, Lil
|
|
|
|
Giomanach
Posts: 6191 Joined: 11/19/2003 From: England Status: offline
|
RE: stylesheet layout - 3/10/2004 11:27:44
Depends on your preference and how you find it easier to read stylesheets etc. The top example you have given will shave of bandwidth, but is also harder to read by the human eye. The second of you examples will work as well, but it will use that little bit more bandwidth. There's no difference it just depends on which one you find easiest to read HTH Dan
_____________________________
|
|
|
|
c1sissy
Posts: 5094 Joined: 7/20/2002 From: NJ Status: offline
|
RE: stylesheet layout - 3/10/2004 12:16:42
Hi lilblackgirl I use your second example myself. I find that it is easier for me to read by doing it this way. also I think if I were having trouble with something and wanted someone to read my code, I think that the second way is better, but that is only my opnion, and you do what is best for you when you set up your style sheets. Take care!
_____________________________
Deb-aka-c4Ksissy high panjandurum and alpha female of the silverback tribe As decreed by Jesper 5-24-2003. The only stupid question is... the one that is never asked!! http://cssinfo.debsplace.org http://positioniseverything.net/ http://www.tanfa.co.uk/
|
|
|
|
lilblackgirl
Posts: 288 Joined: 5/16/2002 From: Status: offline
|
RE: stylesheet layout - 3/10/2004 13:30:30
so it's purely a matter of preference. Yeah, c1sissy, i prefer the latter of the two as it's just easier to read and update and find than solid lines.
|
|
|
|
Nancy
Posts: 3626 Joined: 11/9/1999 From: Nebraska Status: offline
|
RE: stylesheet layout - 3/10/2004 13:49:58
I know I certainly prefer the second method. I also don't know why it would make any difference as to bandwidth used though. Nancy
_____________________________
Easy Estimates -- is a simple to use tool to quickly build a Web site page enabling visitors to quickly and easily create an estimate of the cost of services that you provide.
|
|
|
|
d a v e
Posts: 4408 Joined: 7/24/2002 From: England (but live in Finland now) Status: offline
|
RE: stylesheet layout - 3/10/2004 14:02:22
the more lines the more extra bytes - was it a byte a character or something? think about it, in a long stylesheet of 50 lines if ran all those lines together like above you might save anything like 0.5k. as far as i understand it because the style sheet is cached it's only downloaded once (but i can't swear to this) so you'd be better at looking at your code or - a lot easier - your pictures. i'm not saying it's not worth doing but the savings are minimal IMO, at least for the general developer. it's also a lot easier to go back and edit the style sheet after as well when it's laid out line by line
_____________________________
David Prescott Gekko web design
|
|
|
|
lilblackgirl
Posts: 288 Joined: 5/16/2002 From: Status: offline
|
RE: stylesheet layout - 3/10/2004 15:09:37
Well, and I would imagine that the latter would be the preferred method for you hardcore CSS users/table haters (which I'm quickly becoming). Will higher byte sizes take longer to load because there are more lines to read or is it pretty much just instantaneous regarless of file size (within reason)? Regardless, thanks all for the comments.
|
|
|
|
d a v e
Posts: 4408 Joined: 7/24/2002 From: England (but live in Finland now) Status: offline
|
RE: stylesheet layout - 3/10/2004 15:36:30
more lines takes up more filespace, but it wouldn't generally be particularly siginificant to most sites i wouldn't have thought. I certainly wouldn't bother changing to the all in one line approach. maybe someone else knows of a circumstance where it would make a signifiant impact?
_____________________________
David Prescott Gekko web design
|
|
|
|
lilblackgirl
Posts: 288 Joined: 5/16/2002 From: Status: offline
|
RE: stylesheet layout - 3/10/2004 15:44:24
So, it does matter. It may not be visible to me, but it may save those fractions of a second for someone else. And Gorilla, while I've got you here (you didn't think you'd get away that easy), i've been messing with your work from the CSS post that you displayed the different page layouts and so forth. I'm still a big table user and pretty much use CSS for font color and minute little things. Is there a trick to transitioning from what I'm doing to completely building a site from CSS? I'm willing to sit down and just start coding by hand (using your examples to learn from), but do you have any suggestions for things i should look out for, stay away from, etc? Oh, and <fieldset> and <legend> . . . WAY COOL! Wish I'd known that existed before now. God, i feel like such a newbie. thanks, Lil
|
|
|
|
Peppergal
Posts: 2207 Joined: 9/20/2002 Status: offline
|
RE: stylesheet layout - 3/10/2004 16:41:07
quote:
you hardcore CSS users/table haters LOL
_____________________________
Northeast PA / Poconos/ Lake Wallenpaupack Real Estate wallenpaupacklakeproperty.com Karen's Real Estate Blog
|
|
|
|
Nancy
Posts: 3626 Joined: 11/9/1999 From: Nebraska Status: offline
|
RE: stylesheet layout - 3/10/2004 17:23:24
Stacked tables - one on top of each other, like a stack of books etc for example - the header area can be one table, underneath another new table for the main content, and underneath it a new table for the footer area. Instead of having one main table with the above mentioned areas inside of it with nested tables. Make sense? Nancy
_____________________________
Easy Estimates -- is a simple to use tool to quickly build a Web site page enabling visitors to quickly and easily create an estimate of the cost of services that you provide.
|
|
|
|
lilblackgirl
Posts: 288 Joined: 5/16/2002 From: Status: offline
|
RE: stylesheet layout - 3/10/2004 18:03:16
yup, complete sense. I just never heard of them referred to that way. Guess i just never knew they had an officail name.
|
|
|
|
gorilla
Posts: 2974 From: Denmark Status: offline
|
RE: stylesheet layout - 3/11/2004 3:06:03
Saved by Nancy's clear explanation, thanks Nancy. That idea of nesting is very important. You'll often find in css layout - well all layout - that what you do is create a box , typically with say just borders and backgrounds to hold the boxes that actually have the content in place place on the screen. Nesting Example: <div> <div><p> Gorillas are like birds they live in nests</p> </div> </div> Here's another example for a page that would have lots of thumbnail images in it: <div id="boxside"> <div><br/><img></div><br/> <div><br/><img></div><br/> <div><br/><img></div><br/> <div><br/><img></div><br/> <div><br/><img></div><br/> <div><br/><img></div><br/> <div><br/><img></div><br/> <div><br/><img></div><br/> <div><br/><img></div><br/> <div><br/><img></div><br/> <div><br/><img></div><br/> <div><br/><img></div><br/> <div><br/><img></div> </div> Ask away - that why we're here :-) And yes quite deifintely, I really like that attitude, nose to the grindstone and make it work - it's actually a fair bit of fun too - you can add a sparkle - your own sparkle to everything you touch. You'll probably spend little while swearing at it, then you'' swear by it and wonder how on earth you ever managed without it. You're timing good btw - those who've got a real grasp of CSS2 now - will be very well placed for CSS3 - yes that's still some time away. but I'm drooling at some of the possibilities. <added> Ah, yes, I've toddled along to your site, I remember it, did I critique it for you here on outfront or did I just look up your profile after answering a question? Can't remember, need more coffee! Anyway i remember liking it a lot. And your portfolio too. I get enthusiatic about people who think about navigation and produe nice clear navigation structures. I rather suspect you're going to have a lot of fun :-) </added>
< Message edited by gorilla -- 3/11/2004 4:00:01 >
_____________________________
Mháircaish Signature self-censored to protect the sensibilities of the thin-skinned . May we never confuse honest dissent with disloyal subversion. – Dwight D. Eisenhower
|
|
|
|
c1sissy
Posts: 5094 Joined: 7/20/2002 From: NJ Status: offline
|
RE: stylesheet layout - 3/11/2004 7:08:39
quote:
Elizabath Castro's book: - HTML for the World Wide Web, Fifth Edition with XHTML and CSS: Visual QuickStart Guide lilblackgirl, this is a good book, I'm reading it right now. I know you will enjoy it.
_____________________________
Deb-aka-c4Ksissy high panjandurum and alpha female of the silverback tribe As decreed by Jesper 5-24-2003. The only stupid question is... the one that is never asked!! http://cssinfo.debsplace.org http://positioniseverything.net/ http://www.tanfa.co.uk/
|
|
|
|
lilblackgirl
Posts: 288 Joined: 5/16/2002 From: Status: offline
|
RE: stylesheet layout - 3/11/2004 9:23:18
Gorilla, thanks, that means a lot to know that someone like yourself appreciates something that i've done. I think the current layout i'm using may be going away for two reasons. 1. I usually can't go longer than about 6 months without completely changing the layout and format of my site (see the end of the 'webwork' section at the numerous iterations of my site), and 2. About 2 months ago, i started messing around with some CSS (imagine that) that i ganked from a european sports site that showed me how to format navigation using only CSS. Now, it's chock full of tables still (it's so hard to get away from them once you get comfortable with them), but I'm going to make an effort to do away with most of them and try to build the site strictly in CSS. I know i've got my work cut out for me. Ok, you said to ask away, so could you take the example you posted here and show me the finished product (if it's possible), so i can see the code next to what it looks like? That kind of leads into my next comment which is a response to c1sissy. Yes, i picked up the book yesterday and got thru chapter 10. I couldn't put it down! Even going through the basics uncovered some things for me and the author really has a way of making things simplistic and easy to understand. I've read a billion tuts on HTML and CSS and in one night, she managed to explain a bunch of things i didn't understand or was to embarassed to ask about. I'm realizing that CSS is an amazing and versitile tool, but i'm also thinking that there seems to be a lot of unneeded repetition to cover little things. For instance, why use the <div> tag when simple HTML could just as easily do the same thing? And i haven't completely grasped the real purpose of thngs like the <div> tag or the <id> tag (it is a tag, right? - see, i'm confused). Anyway, i know it'll take a lot more reading and just outright testing to make sense of it all. thanks, Lil
|
|
|
|
lilblackgirl
Posts: 288 Joined: 5/16/2002 From: Status: offline
|
RE: stylesheet layout - 3/15/2004 12:57:49
yup, that's the one.
|
|
|
|
ritarun
Posts: 680 From: Upstate New York USA Status: offline
|
RE: stylesheet layout - 3/23/2004 9:36:53
quote:
As a practical tip: I take a copy of my styles and paste them into a text editor. I then add line numbers to that copy. Next I make notes something like "lines 45 -58 do this and are dependent on that" "lines 12-15 inherit from ......" and so on. makes life a lot easier in the long run. The above was from a post by Gorilla. This sound like it would really help me. I am struggling with understanding HTML and CSS coding. When I read this tip I went in search of trying to add lines in my text editor. No can do... Nothing so far has worked. Can anyone help me out? How do I add numbers to the lines of code so that I can make notes? Also I remember something about two different types of "edits" in CSS. Which version should I use?
< Message edited by ritarun -- 3/23/2004 10:27:45 >
_____________________________
Success often occurs in private, but failure usually in full view.
|
|
|
|
c1sissy
Posts: 5094 Joined: 7/20/2002 From: NJ Status: offline
|
RE: stylesheet layout - 3/23/2004 10:09:41
Hi Ritarun, how are you doign? I think what Gorilla might mean to do here is to have 2 copies of your css file. The one with the numbers you would save for reference (and in the text editor I belive you would just add the line number to the code?). The second one would be the one that you link to your html/xhtml file. also, don't forget that you can use css commenting to help you out with things that you need to remember in your css file. Such as the following /* this is the color red*/ lol, I use this on my practice pages to let me know the color name of the color that I am using. Also, you can use the comment for commenting out code as well. If you already have something in your style sheet, and want to try something different in that particluar spot, just comment out the original, put in what you would like to try, then this way you won't loose the original that you have in case you want to go back to it. I'm not sure If I helped you out or not, but I hope so!
_____________________________
Deb-aka-c4Ksissy high panjandurum and alpha female of the silverback tribe As decreed by Jesper 5-24-2003. The only stupid question is... the one that is never asked!! http://cssinfo.debsplace.org http://positioniseverything.net/ http://www.tanfa.co.uk/
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|