homepage Welcome to WebmasterWorld Guest from 54.204.231.253
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Different Browsers show very different alignments
captainron19




msg:3851078
 1:55 am on Feb 17, 2009 (gmt 0)

Someone recently told me a web site I developed for them is not aligning properly and they use firefox for their browser.

I checked the web site in multiple browsers and for the most part it appears ok except for firefox, netscape and chrome.

The page is was looking at is extremely basic - 3 tables all centered underneath one another. How can I found out what is wrong with my coding in the browsers where the alignment is out of skew?

 

D_Blackwell




msg:3851083
 2:05 am on Feb 17, 2009 (gmt 0)

It may be necessary to post enough code to replicate the problem. Maybe there is simply some default margin or padding that is out of whack and needs to be specifically declared.

Not enough information to make many suggestions, but working in IE, and not several other browsers is a flag. This would indicate a coding problem and not a browser problem. How about Opera? If it is was designed with IE as the primary testing platform that is problem #1. Code to standard first, then fix IE.

tedster




msg:3851113
 2:44 am on Feb 17, 2009 (gmt 0)

Your first step in curing any cross-browser display issues should be to use the W3C Validators:

W3C Validator - HTML [validator.w3.org]
W3C Validator - CSS [jigsaw.w3.org]

Trying to fix display problems with invalid code can actually be impossible, like trying to win a whack-a-mole.

D_Blackwell




msg:3851178
 3:34 am on Feb 17, 2009 (gmt 0)

tedster is 100% correct. Declare a DOCTYPE and validate the HTML and CSS before anything.

The description of your tables not stacking correctly in some browsers or browser versions screams margin issues however, and my first bet sloppy code that validates, but doesn't render 'correctly'. It could be good code that just trips up and needs a fix, but that would be my second option.

phranque




msg:3851285
 7:25 am on Feb 17, 2009 (gmt 0)

also as mentioned by D_Blackwell, the default margins and/or padding are typically different among browsers.
after validating, you might try setting all margins and padding to zero for the document and then specifying overrides where necessary:
* {
margin:0;
padding:0;
border:0;
}

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved