Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-31-2007, 03:22 PM   PM User | #1
reyna12
New Coder

 
Join Date: Jan 2006
Posts: 88
Thanks: 4
Thanked 1 Time in 1 Post
reyna12 is an unknown quantity at this point
CSS Site, Fine in ie, firefox slightly deformed

Link
CSS

It looks how i designed it in IE but in firefox the layout seems to be all over the place.
reyna12 is offline   Reply With Quote
Old 05-31-2007, 04:23 PM   PM User | #2
ahallicks
Senior Coder

 
ahallicks's Avatar
 
Join Date: May 2006
Location: Lancaster, UK
Posts: 1,134
Thanks: 1
Thanked 57 Times in 55 Posts
ahallicks is on a distinguished road
Well that would be because you've designed it for the none-standards compliant browser! You'll find it a lot easier to code a web site for Firefox and then use hacks/conditional statements to get the correct rendering in IE, rather than the other way round.

The first thing I would add, if I were you, is the Universal Selector as it will completely zero out all margins in IE and Firefox, giving you a more supple base to begin building your pages on. IE and FF add their own, so cancelling them out makes it much easier to build a page that looks the same in both browsers.

To center your page you don't need all those negative margins and positioning, just use:

Code:
#maincontainer {
	width: 776px;
	height: auto;
	margin: 0 auto;
	overflow: hidden;
}
I'm not sure what you are using as a background to your site, but it would be best to put it here so that it would stretch the height of the container div, and therefore all of your content.

Your footer would probably be better placed inside the container and all of that positioning removed again:

Code:
#footer {
	width: 780px;
	height: 31px;
	background: url(images/footer.jpg) no-repeat;
	float: left;
}
Just some tips to start with... plus you have some validation errors it would probably be worth sorting out too.
__________________
"write it for FireFox then hack it for IE."
Quote:
Originally Posted by Mhtml View Post
Domains are like women - all the good ones are taken unless you want one from some foreign country.
Reputation is your friend

Development & SEO Tools
ahallicks is offline   Reply With Quote
Old 05-31-2007, 05:14 PM   PM User | #3
reyna12
New Coder

 
Join Date: Jan 2006
Posts: 88
Thanks: 4
Thanked 1 Time in 1 Post
reyna12 is an unknown quantity at this point
Thanks

Decided just to re-do it, code it for firefox instead and seems to have worked out well.

http://www.designerhost.co.uk/fireplace/firefox.html

Not checked for validation errors.

Shame about the jaggy fonts though, any way to sort that?
reyna12 is offline   Reply With Quote
Old 06-01-2007, 09:31 AM   PM User | #4
ahallicks
Senior Coder

 
ahallicks's Avatar
 
Join Date: May 2006
Location: Lancaster, UK
Posts: 1,134
Thanks: 1
Thanked 57 Times in 55 Posts
ahallicks is on a distinguished road
Hmmm... two options... change them to images (not overly semantic, although they can have an alt tag) or try a different font. More and more frequently I'm finding that design I create in Photoshop simply don't look as good in browsers because they aren't able to render smooth, large fonts.

I thought I'd let you know that I've stolen the code for the javascript thingy to use on my site, sorry! I like it so went through and took the relevant bits, hope you don't mind!

I would suggest that you start indenting your code. I've checked for validation again and you have no alt tags in any of your images, which the doctype and web standards ask for. You can also get rid of the 'tabindex' as that is not required for anything as far as I can tell? And you are still missing a closing div, or have one too many open? Indent your code properly and you should be able to see which one it is you are missing
__________________
"write it for FireFox then hack it for IE."
Quote:
Originally Posted by Mhtml View Post
Domains are like women - all the good ones are taken unless you want one from some foreign country.
Reputation is your friend

Development & SEO Tools

Last edited by ahallicks; 06-01-2007 at 09:37 AM..
ahallicks is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:13 AM.


Advertisement
Log in to turn off these ads.