Jump to content

bunch of css questions

Recommended Posts

ok I didn't know where to turn so I thought, were else but the w3 forum, I was running off of phpfreaks.com I still am but I think better css support here.I wanted to ask some major questions, that are driving me crazy, my website iswww.freelancebusinessman.comPlease bear with me, I don't think I am going to come on here, and impose on anyone. I am just asking if anyone gets a chance to pour over my list of questions, and they see one they can answer, just drop down the number of the question, then there answer, opinion. A little background information about where I am coming from before I start asking.I have become obsessed with some things. I want to do all css/xhtml by hand, javascript/php/sql, everything I know and am learning so far I like coding/programming by hand. I like following all possible good programming/coding practices in existence. I like going the best routes, avoiding things that would show bad programming/coding. I am saying no one is bad, by my personality and my love for this field, requires me to be an extreme perfectionist, to make sure all my coding, is 100% validated, compatible with all possible standards, accessibility, THE MOST CROSS BROWSER compatible, I can find, and when I can as many screen resolutions as I can find. I try to bring out the best in every website. I like using css/xhtml for the layout, I like using javascript for what it is uses for excetera, now that you know where I am coming from here are the questions I am asking, I am looking for opinions/answers/or if someone has proof of something they want to share, anything and everything on any question would be a great help to me and my career as I advance my css knowledge specifically. 90% of these questions are css related, and only a few related to php(but still directly related to css in general.)on to the questions, thank you so much for your time and patience in at least skimming this far.1. My site works perfect in, ie, netscape, firefox, but in opera, it shows a problem with the main content, going over the logo. I implemented a hack to fix the issues in ie, more questions about hacks later.2. Ok, I am thinking I want people's opinions, what browsers(screen resolutions) should I try to satisfy, and what browsers should I let slide by. I have other questions below relating to alternate stylesheets, excetera.3. Is it good/bad/standards to use multiple stylesheets, wired together with a browser sniffer in the form of javascript or php. Is this good practice bad practice, if it's good, and I do this, will it take away from the need of me to learn how to properly create css to get rid of those issues with strictly css. 4.In the w3 website it tells me to use selectors as followFor id's and classes, examples for both


This is the w3 stated way, the way I have been doing it, and learnt to do it is

#maincontent p{}#maincontent h3{}

Which way is better, for what purpose and why. I know w3 is standards compliant and I am all about standards, do I fall out of standards if I continue to do it, the said way, which is the way I always see it, even at www.csszengarden.com. I need to know because if for some reason I should use w3 examples, I will immediately go through my entire site and change all the code. 5. I see alot of people using 3 php file includes, to include a header, footer, and content. What is the purpose of this, I think it's some sort of way to avoid running into as many browser incompatibilities, as creating one full page, in Xhtml, css.Is this good practice, or bad practice, or will it hurt me learning css to the full extent, of the reason I need to learn it.Or do they do it for some specific security issue that I do not know of.6. I REALLY REALLY REALLY want to serve as many browser's as possible, and as many screen resolutions, as possible. But I don't want to fill my whole css page with hacks. I am not putting down people who do, I just had to use a hack to eliminate that horrible render in ie, now it works good in all browsers but opera, and I am stuck, what I am wondering is how do I get to the point where I can create a website that is compatible in all browsers, WITHOUT having to use hacks, and WITHOUT having to use browser sniffer's.7. Ok now let's backtrack and ask this questions. I understand the general idea of ice, jello, and liquid designs. I want to reach liquid design, because I notice, in liquid design if someone changes the text on there screen, even to the largest font everything still looks good. If someone is using any screen size, or screen resolution, or has there window open in any side, the content may not look as good, but horizontally it still ALL fits in the window, in a format that is somewhat readable. Will liquid websites, once I get the general idea of making them, be something I can do with any and every design I ever try to make, or will I sometimes have to have ice or jello, or is liquid something I can always fairly easily get no matter what the general layout, coloring, and structure of a website.8. What steps do I need to take to try and achieve liquid design, what general ideas, tips, tricks, shoudl I keep in mind, during all projects, when trying to make any project a liquid website, or changing a random mess of tables, into a div liquid website layout. Or get a already set div layout and turn it into a liquid design, without killing the overall look.9. I hate tables, but I still even see the w3schools.com website using them, even though they throw all that stuff in there about css layout, why do they defy there own principles. They validate there stuff as they preach about, I am not saying they are bad, but why do they still ahve the table layout, instead of css div and span tags.10. I was told absolute and relative position was bad, by a lot of people, and to use floats, margin, and padding instead. The only bad thing I noticed about absolute and relative position, was that divs set with this could not have the text in the browser highlighted, it was always really off when doing highlighting. So when I changed that I started using floats, and using, margins and paddings. So what now, how do I know what other bad things there are about using absolute and relative positioning. I probably intend to use absolute and relative when positioning my links to the validators and things like that.11. If I stay away from absoltue and relative positioning. Is it going to hurt anything if I use absolute and relative posititioning to get my 2 pictures for validation, and validation picture for the robots.txt file aligned with that, or will the absolute positioning on just those still cause some sort of problems12.I may have more questions later. I am really trying to advance some parts of my career right now, and the one I am trying to build on right now is my css, anyone who can answer any of these questions, offer opinions, or show link to prove specific elements of specific questions would be greatly appreciated.

Link to comment
Share on other sites

1. We should later investigate the issue. It's hard to make a site work in all browsers, we know. That's why forums like this one exist.2. Good. You'll know what to treat with priorities. Very good. So what's the problem?3. I would say it's a good thing to use multiple stylesheets, but avoid browser sniffers. You may ran in a situation where unlisted browsers can't access the page.4. Actually I see only examples of the ID selector (#). For it, I would say that it's a best practise to use at as you are doing now, scince IDs are only supposed to be used once per page. As for classes, it depends. If different elements of the same class have common properties, you should use only the .class selector itself. If you want to style only specific elements of this class, use the element.class selector.5. The purpose of server side includes (SSI) is simply to reduce maintainance time. Instead of writing the header on every single page every time it changes, you only edit the included file. This is a good practise, but in my personal opinion it's not exactly the best one. But it is definetly the easiest one, so don't be afraid to use it.6. We all want to do that and unfortunatly, we all know it's impossible. It's either a browser sniffer or hacks. The only other way would be to REALLY limit yourself with REALLY simple tools.7. Techically speaking, most developers create their layouts and use it as a "sceleton" of every new site they make, so you could do the same too.8. In short: CSS hacks.9. There is a questions others ask too. W3Schools' (reasonable!) answer to this is that they are concentrating more on expanding their tutorials, then on their accessability features. I would say that when W3Schools expands enough and new versions of IE(7 for starters) come out, you may then start to expect W3Schools to convert into tableless layout.10. Well, you said the benefits of float yourself. It's just that absolute positioning doesn't hold them.11. I would say it's fine.12. Well if you have more questions, don't hesitate to ask :) .

Link to comment
Share on other sites

The problem I am having is I had someone on www.phpfreaks. give me some code to put into my body, and 2 of my ids,or classes whichever I had them set as, and it immediately fixed the problem without hacks, I am confused. I want to get liquid design, my website is www.freelancebusinessman.com I haven't implemented the new code yet, I will on monday. I will start working on that liquid design thanks for all the help, I asked all these questions over and over again at www.phpfreaks.com and never got an answer, except one person who just gave me the new code to fix opera, thanks for the help I will be coming here a lot more as well. Thanks.

Link to comment
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

  • Create New...