473,396 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

(Safari) Margin-top in Footer not working

Hi,

I'm currently working on a small "student support" website for my college. I've validated both the xhtml and css with W3C and pounded out all of the bugs in most major browsers.

However, Safari seems to be ignoring the "margin-top:-130px" property of an image in my footer and I'm not sure why. When I commented out that property, IE and Firefox displayed the problem identically to Safari so I can tell that it's simply skipping that command.

From searches on Google, I can't find any known issues with it so I can only assume I'm doing something wrong, which isn't all that shocking. I only began coding in CSS last week, as you'll probably be able to tell soon.

Here are the files:
http://www.muc.edu/~loudintl/footerfix/index.html
http://www.muc.edu/~loudintl/footerfix/css/master.css

The image in question is the bottom right "Mount Union College" logo.

Any help would be greatly appreciated - even off-topic tips if you have them, since I'm really not sure if my code is up-to-snuff even if it did validate.

Thank you!

Travis Loudin
May 15 '07 #1
5 9033
drhowarddrfine
7,435 Expert 4TB
Couldn't find anything exactly the same as you describe and I don't have a Mac but I did find someone saying Safari has problems with negative margins on items where the negative margin is larger than the container it is in. You might try experimenting with making the container larger or the negative margin smaller to see what happens.
May 15 '07 #2
Couldn't find anything exactly the same as you describe and I don't have a Mac but I did find someone saying Safari has problems with negative margins on items where the negative margin is larger than the container it is in. You might try experimenting with making the container larger or the negative margin smaller to see what happens.
Thank you for the reply!

I tried making #mucbar margin-top: -3px, then made #footer height:180px, but neither seemed to budge the image a single pixel. If I make margin-top: a positive value, it moves (downward, as expected).

I can see that the problem must be with the negative value in margin-top but I'm not sure of a way to place the image where I want it through a different method. Margin-bottom didn't do the trick. Any suggestions?
May 15 '07 #3
I'd still appreciate any and all suggestions, but my temporary solution is to use a CSS hack to target only Safari and hide the image.

Expand|Select|Wrap|Line Numbers
  1. body:last-child:not(:root:root) #footer #mucbar {
  2.    display: none;
  3. }
  4.  
Again, please throw out any ideas you may have. This is definitely a working solution but I feel hacking should always be a last resort. Thank you.
May 15 '07 #4
I got my answer: apparently there's a bug with float elements and negative margins in Safari.

http://www.456bereastreet.com/lab/float_negative_margins/

I changed the element to "position:relative," modified the padding a little and all is well. Thanks everyone,

Travis
May 15 '07 #5
Thanks for posting this problem/solution. FWIW, Safari 3 (beta) seems to have addressed the bug.
Jun 27 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ulrich Albrecht | last post by:
Hi, I'm making a complicated css based site (CMS) without tables (because of Accessibility). It looks good in any new browsers on my machine (IE5.5, IE6, NS7, OP6, Mozilla 1.1) :-) You can...
0
by: Josh Renaud | last post by:
I'm still trying to solve a problem I experienced in Safari. This is my second post on the subject. Here are the relevant links: page: http://www.joshrenaud.com/fredbear/contact2.html css: ...
8
by: Giuseppe Chielli | last post by:
Hi to everyone? Can someone tell me if there is a way to identify Safari...I found out that navigator.appName returns "Netscape" and I didn't found any option to change the browser's definition......
13
by: elektrophyte | last post by:
I've got a short script that works fine in I.E. and Firefox, but not in Safari. It is supposed to print a constantly-updating counter on the webpage. Any ideas how to get it to work in Safari? The...
6
by: Tim Rogers | last post by:
Hi! how do I get around the problem of safari failing to fit a table row to the size of the text based content in the same was as IE does? For example if I were to create a 5 row table add...
1
by: krystian.kochanski | last post by:
I have created the CSS based navigation using lists, I followed all the conventions like to reset all the padding and margins first etc. The menu looks great in PC Internet Explorer, looks the same...
4
by: Summercoolness | last post by:
does anyone know why this CSS works in IE 7 but not Firefox or Safari? (it works weird in Firefox and Safari) <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://...
3
by: leebridgewater | last post by:
Hi all, I have put together our own web site, its only small so I decided after reading up on CSS web design to do the site myself. The site looks good in IE7 but when you use IE6 the green and...
5
by: Matthew | last post by:
Hi Guys, On a Windows PC it's easy enough to test how a webpage looks in Firefox, IE, and Opera, but what about Apple's Safari? Unless you have an Apple as well, which I do not. Is there some...
2
Stentorian
by: Stentorian | last post by:
Hello, I am having trouble with skinny images in Safari on a Mac (This works fine in Safari beta for windows!) Basically I have set up a CSS class using 'max-width' to ensure that images do not...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.