ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've got a bit of a CSS/HTML problem here. I'm a novice with web design, and I'm coding up a small test site. It displays fine in Opera and IE on Windows, but if I go to Linux and use Opera or Firefox it comes out mangled.
The bits that get mangled are the rounded boxes I have created by copying the code mentioned here. It's like the corners are the wrong way around or something, and they don't line up properly with the edge of the box. It's especially strange because it renders fine in Opera on Windows, yet the same browser on Linux screws it up. I've tried different screen resolutions and it makes no difference.
Is anyone aware of any Linux libraries I might need to install to get proper CSS support? Alternatively, can anyone spot any OS-specfic bits of code in the CSS in that link? It looks OK to me, which is why it's so puzzling.
I'm taken the example code from the page you referenced, and I'm looking at it now in three different Linux browsers (Opera 8.5, Konqueror 3.3 and Firefox 1.07), and it looks fine.
I also can't see anything in the code that looks wrong.
What browser versions are you using? Have you modified the code from the example, or are you seeing this effect with exactly the same code as that?
I'm pretty certain it won't be anything Linux specific, because all three browsers I'm testing have their own page rendering engines.
One question I will ask, though, is whether you've got a doctype declaration at the top of your page -- something that looks like this:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
If you haven't, you should add it, because when it's missing, certain browsers (MSIE and Opera in particular) will render certain CSS elements very differently, and not conforming to standards. They do this to maintain backward compatibility with older sites. But when you add this tag, you're telling the browser explicitly that you want it to conform to standards, so they should all look exactly the same. (... almost )
There's a couple of different variants you can use on the above line, but the loose.dtd is probably the best one to use if you're not sure.
Thankyou very much guys. Sorry for my late reply. I'll try the things you guys mentioned and see how I go.
I'm using the code unmodified, in Opera 8.5, IE 6 and Firefox 1.07. Spudley, I don't have a doctype declaration, so that may be what's stuffing it up. I'll have a fiddle with it and see what happens.
xhi, thanks for the link, I was looking for something like it not long ago.
A general rule if you want your webpage to work on a lot of browser, be small , be compliant is to BEGIN by using a full-css-compliant browser like emm... not IE
And then add awful hacks for IE.
Otherwise you will face big headaches and have a dirty/long/not wellreferenced page
Damnit, I still can't get it to work. I tried doing a pretty much direct cut and paste (I added the <HTML> tags and CSS link stuff to the code but that was it), and it still doesn't work. I also tried the Doctype thing but that made no difference.
It looks fine in Windows on any browser (Firefox, Opera and IE), but on Linux with either Firefox or Opera it comes out wierd. This is what it looks like.
Anybody know what I'm doing wrong?
Cheers
Ovalteen
EDIT - I've also tried mucking around with some of the CSS properties (tweaking the positions and various things), and that hasn't made a difference (what I do usually makes it worse).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.