This is a discussion on "Alignment Problems with CSS" within the Web Page Design section. This forum, and the thread "Alignment Problems with CSS are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Alignment Problems with CSS
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Hello - I'm starting to get familiar with CSS, and I'm stumped on a site design. The site is http://www.thekennylawfirm.com/demo2.
I've used CSS to create a black inner area that runs from top to bottom of the page. In Internet Explorer, the black inner area appears properly. However, when viewing the site in Firefox, the black inner area doesn't appear to be as wide as the area above it. I'm not sure if I'm missing something simple, or if my overall logic is defunct. Thanks for any advice! |
|
#2
|
|||
|
|||
|
Re: Alignment Problems with CSS
I'm actually suffering from the same problem myself in that a pair of input fields are appearring at different distances across the page. Firefox and IE7 unfortunately render CSS instructions differently so you're bound to get anomalies like that.
What I am doing is preparing the page so it looks correct in Firefox, then using a browser detect to check for IE (I think the Firefox version will appear identical in Opera and Safari but haven't checked yet) and loading an IE specific stylesheet. Someone else may have a better way but that's how I plan to tackle the problem if I can fix up a few other more important things first. Hope that helps. |
|
#3
|
|||
|
|||
|
Re: Alignment Problems with CSS
You have some ID's used multiple times, you can only use and ID once per page. Problem is IE will render bad code FF will not. So in this case FF is rendering the page correctly while IE is doing so incorrectly. Check your source, clean up any errors and see if that doesn't fix it.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
#4
|
|||
|
|||
|
Re: Alignment Problems with CSS
Quote:
|
|
#5
|
|||
|
|||
|
Re: Alignment Problems with CSS
Quote:
|
|
#6
|
|||
|
|||
|
Re: Alignment Problems with CSS
A good rule of thumb, is if it breaks in FF but not in IE, its probably mixed up code that IE is happy to interpret but FF isn't. Best thing you can do is run your HTML and CSS files through the W3C validator (http://jigsaw.w3.org/css-validator/) and fix any issues there. ID's used twice would have been picked up straight away.
|
|
#7
|
|||
|
|||
|
Re: Alignment Problems with CSS
You are missing a closing div tag at the end, right before the /body tag. Its best to keep your code indented propperly so that you can always debug this kind of thing. Also, the validator would have found this problem for you
|
| The Following User Says Thank You to Grubious For This Useful Post: | ||
|
#8
|
|||
|
|||
|
Re: Alignment Problems with CSS
Quote:
like so...
That saves duplicating information, which saves on file size which will save you a fair bit of bandwidth (which you pay for). |
![]() |
| Tags |
| alignment, css |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Drop down menu alignment problems. Div wont vertically align. | Itsumishi | Web Page Design | 7 | Mar 4th, 2008 05:57 |
| tricky floating problems for div alignment | escaflowne11 | Web Page Design | 4 | Dec 10th, 2006 09:03 |
| CSS Newbie: Firefox alignment problems | SuperGrover1981 | Web Page Design | 1 | Aug 31st, 2006 11:28 |
| alignment problems | joojoo | Web Page Design | 7 | Aug 15th, 2006 09:55 |
| Two problems - image alignment and new browser windows. | DrRedSkwirrell | Web Page Design | 9 | Oct 29th, 2005 01:51 |