| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Jul 2005 Location: Florida
Posts: 233
![]() | CSS - looks right in IE, not FF - please help! (NB for helper) I'm going crazy trying to figure this out. The webpage is located at: http://www.substance-abuse-recovery.com The css file is located at: http://substance-abuse-recovery.com/styles.css In IE, the navigation links are situated inside the div all neatly and nicely, but in FF the background of the links overflows the div. If I add 2px of padding to #topnav it looks right in FF but screws up in IE... Another issue which I can't figure out - I can't seem to be able to add a small footer div (which will contain copyright info) beneath it all. It just doesn't show up! I want it centered, also, but I don't want it to have the border, so I want it ouside the #container div. (You'll have to see the source code) ????: NamePros.com http://www.namepros.com/programming/126956-css-looks-right-ie-not-ff.html Thanks for any help anyone can give me!! (p.s. - 20nb to the cool frood who can help!)
__________________ www.headlinercreative.com
Last edited by TeviH; 09-27-2005 at 11:52 AM.
|
| |
| | THREAD STARTER #3 (permalink) |
| NamePros Regular Join Date: Jul 2005 Location: Florida
Posts: 233
![]() | Huh? It's just a small div - why make it php?! I would have to update it once a year to change the last digit of the year to the correct one...
__________________ www.headlinercreative.com |
| |
| | #4 (permalink) | ||||
| A Wealth of Knowledge Join Date: Aug 2004
Posts: 3,809
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
????: NamePros.com http://www.namepros.com/showthread.php?t=126956 I'm using Safari, and it honestly looks ok from here. Granted I am not a native Safari (or Mac user for that matter), I could be wrong given your intentions. ... Have you changed the page recently? It seems that the page has been changed since I first loaded it, now the header looks a little off. -Steve | ||||
| |
| | THREAD STARTER #5 (permalink) |
| NamePros Regular Join Date: Jul 2005 Location: Florida
Posts: 233
![]() | No, I haven't changed it since earlier today. I've just now checked it in Opera and Netscape. They are having the same issue as FF. The only browser displaying everything correctly (as far as I know - I haven't checked safari) is IE. It's still the same issue - the #topnav links expand past the div they are inside of a couple pixels on the top and the bottom, and the footer div is nowhere to be seen... Ok, I've changed the stylesheet to at least make the footer visible, though it isn't positioned where I want it. I set it to be absolute (inside the #align div which just aligns everything to the center). I want it at the bottom of the page where a good little footer belongs! and the links thing is still throwin me off!
__________________ www.headlinercreative.com |
| |
| | THREAD STARTER #7 (permalink) | ||||
| NamePros Regular Join Date: Jul 2005 Location: Florida
Posts: 233
![]() |
__________________ www.headlinercreative.com | ||||
| |
| | #8 (permalink) |
| NamePros Member Join Date: Dec 2004
Posts: 93
![]() | I have several tips for you: 1) IE does not follow the CSS spec. One huge problem is that it uses the "width" element incorrectly. (My website demonstrates this on my how-to page) IE includes the padding and the border in determination of the box's width. It should not. FF, quite correctly, only sets the content area of a box to be "width". Therefore when you set width=50, padding=20, and border=10....in IE the box occupies 60 pixels of screen space (which I can't explain), in FF it occupies 110 pixels (correct). ????: NamePros.com http://www.namepros.com/showthread.php?t=126956 2) Look up the "clear" element of CSS. I use it all the time. It helps to move boxes to underneath other boxes. Meaning, it may solve your footer problem. 3) Don't need to use the "position" element. I only say this because I've never needed it myself and I have read many other posters say that it is inconsistent between browsers. Often if a block is missing, like your footer, it means you forgot to close a tag...like </div> The only problem with what I told you is what to do when you DO want a border, since you can't use one else the alignment is wrong between browsers. The solution is to get creative in arranging bordered boxes inside the main layout boxes where they won't have any affect on the main page layout. I hope all that helped. |
| |
| | #9 (permalink) |
| NamePros Member Join Date: Jul 2004
Posts: 38
![]() | As mentioned by RaptorRex MSIE does not follow the CSS standards, mainly because Microsoft use it as a marketing scheme (But we wont go into that). ????: NamePros.com http://www.namepros.com/showthread.php?t=126956 You can get round the problem by using the MSIE CSS hack, that is do one property in a class for MSIE followed by the same property with a different (Suitable) value for other browsers. For example if you wanted padding-top to be 6px but MSIE was only padding by 5px you ideally need to be able to specify 7px, this would cause a problem for browsers that interpret the 7px correctly. Because of this you would do the following: Code: .className {
padding-top: 7px;
padding-top /**/: 6px;
} MSIE will read "padding-top: 7px;" and ignore "padding-top /**/: 6px;" however Firefox will read both but apply "padding-top /**/: 6px;" due to precedence. Hope this helps.
__________________ "You don’t learn to hack, you hack to learn" |
| |
| | THREAD STARTER #10 (permalink) |
| NamePros Regular Join Date: Jul 2005 Location: Florida
Posts: 233
![]() | Thanks guys! You both got 20 The links overflow problem was the sizing issue with IE, so your IE hack worked, and the positioning was the problem with the footer. I got rid of the absolute positioning and used the clear and float properties to get things looking right. THANKS!
__________________ www.headlinercreative.com |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| css problems with ie, and a couple other things | thecatat | Programming | 0 | 08-23-2004 06:16 PM |
| Mozilla/Firefox (css) width: 100%; issue. | FieroGT | Web Design Discussion | 3 | 08-07-2004 01:06 AM |
| CSS: what's the use of it? | lucesei | Programming | 13 | 04-12-2004 08:21 AM |
| pb with background (css) | virgile00 | Graphic Design / Flash | 1 | 11-06-2003 09:41 AM |