Question:
I'm a beginner in website design. I'm using CSS in my web applications which is not supported by all browsers?
Johnyj
2009-06-06 22:38:50 UTC
Only Internet Explorer supports my CSS coding. Is there anything that i can make my CSS to support in all the browsers. In there any sort of coding to make my CSS work or to hide the CSS rules. Pls help.
Eight answers:
2009-06-07 12:14:38 UTC
Best thing for you to do is to validate both your CSS and HTML:



CSS Validator - http://jigsaw.w3.org/css-validator/#validate-by-input



HTML Validator - http://validator.w3.org/#validate_by_input+with_options



HTML Tidy - http://valet.htmlhelp.com/tidy/



Ron
Stephen W
2009-06-08 07:40:17 UTC
It's a difficult one to answer without seeing the actual display problems you're having but cross browser problems are usually down to width of elements.

If the width property is omitted from an element, most browsers will calculate the overall width as being the contents + padding + border thickness + margin. If the width is specified, then again most browsers will calculate the overall width as being this width + padding + border thickness + margin. Note that Internet Explorer 6 and below are different and will take any specified width as being the width regardless of padding, border and margin. As a result, additional styling known as "hacks" are often required in the stylesheet to allow for this (note that IE 7 works fine) otherwise webpages may not look right in those browsers.

See http://www.freewebtutorial.co.uk for more help.
KMR
2009-06-09 01:11:29 UTC
This is incorrect syntax for this type of stylesheet. In addition, this links an external stylesheet to multiple pages. If you are embedding styles on every html page, this is not used.



Not this:





This is the proper way to link an external stylesheet:

There is no '/link>' at the end.



I presume by your first declaration, 'body,td,th...' that you are planning to use tables, but you forgot to declare the table tag.



Also, it's not wise to define a height such as 1580px. Either your page will be way too long with a lot of empty space and an unnecessary scrollbar, or it will be too short and will cause problems for any content that extends beyond it. You have no control over the actual size of font your visitor will use, so you want an undefined page height. If you are trying to control what happens at the bottom of your page, there are proper ways to contain the flow of your content while still using a structured footer at the bottom.







I suggest you visit http://www.w3schools.com/css/ to help you get started. There are too many errors in your code above. It is advised that you start over, but with a better understanding of basic structure.



CSS is not easy to learn. You can't cram to learn it all at once. It takes years to master it, and you never really do because it keeps changing. Microsoft IE is the errant browser that doesn't play by the rules and makes up its own rules causing developers major headaches along the way. All the other browsers are, for the most part, standards compliant.



I also recommend books and articles by Eric Meyers. He is no longer the cutting edge of CSS, but few can match his ability for writing clear, easy to understand tutorials for all levels of coders. All of his tutorials and books are project based, so you practice coding on real world examples that build in complexity as you learn. The link above for the w3schools site is also very good.



Without viewing the html code that references your styles, I cannot properly troubleshoot your code. It's clear that you don't understand what you are doing yet. Don't be discouraged. We were all where you are at one point. Start with the basics so you can see what happens with every line of code you write.
Spacer
2009-06-06 22:55:50 UTC
You would have to implement what they call a CSS hack, which is a way to make your CSS work in all browsers. You can always create 2 separate CSS files, one especially for IE and one for (Firefox, Safari, Opera, etc) as these render CSS almost the same way. You can also use CSS "if" statements.
marcyniuk
2016-10-01 10:28:56 UTC
a million) that is no longer an improve, it relatively is a "do from scratch". no person is going to enhance an internet site carried out in tables. (Positioning is carried out in CSS, and has been for a jointly as.) 2) you may get it carried out from everywhere from $a hundred (lease-a-coder - in case you get what you want, and jointly as your infants are nevertheless this fringe of ninety, you would be between the few), or you may artwork with a real cyber web developer and pay a minimum of a few thousand - extra in case you want something extra advantageous than what you have and what you published. In cyber web layout, you usuaally get what you pay for. do you want a baby working for gasoline money? Or do you want somebody who's accustomed to the criminal ramifications interior the U. S. (you're storing suggestion that your clientele supply you - what happens if somebody steals it), suited protection layout (storing passwords in straight forward text cloth is risky, md5 is extra useful, sha1 remains extra useful), strategies of retaining the area, etc.? in accordance with what i've got considered of your website, a number of the extra value-effective designers you may hire do no longer understand as plenty approximately cyber web layout as you do, yet they take $a hundred from all of us silly sufficient to artwork with out a binding settlement, and would make some thousand a week that way. (You, of direction, finally end up having to choose on if that is worth it sluggish suing somebody with the abode courtroom benefit midway around the globe for $a hundred.) detect an internet site that does what you're searching for. seek for a cyber web link or e mail address (in many cases down on the backside in a small font) for the guy who, or business enterprise that, designed the area, and touch them. you already understand that a) they grant and b) you like their website. speaking is loose. once you have settleed on precisely what you like, and what they are in a position to grant, they are going to offer you a particularly precise estimate, if no longer a assured value. once you're chuffed, sign a settlement and you will desire to have your website up and working by skill of the agreed-upon date, in case you pay the agreed-upon money on the agreed-upon time table.
bggraves4000
2009-06-06 22:43:24 UTC
Unless you post your CSS code, we have no idea. Many times, a fix will be online if you Google the property and put the browser you want to support.
Jeaux
2009-06-06 22:43:57 UTC
Seems backwards to me. ur CSS should work fine in all browsers with the exception of IE, which u'll need to write alternate CSS for. Post ur code plz
2009-06-06 22:44:44 UTC
This is a good problem. There are special code to see if your broswer is IE or firefox.



IE has different problem between 6 -7 and they vary on CSS. I would recommend plain CSS, not unless you do more research. <-- IE -->


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...