Reply
[float problem] Safari/Opera adding extra padding?
Old 04-29-2008, 12:26 PM [float problem] Safari/Opera adding extra padding?
Junior Talker

Posts: 3
Although i am no stranger to CSS, i am very new to the complete seperation of content and presentation. Now that i am, completely, relying on CSS for presentaion i am running into some hurdles.

I am in a real bind and need to present this by this Thursday. Yikes. I still need to dress it up, artistically, but i am having an alignment problem with one of my divs. Everything displays properly in IE7 and FF. Safari and Opera seem to be adding 8px to the right of the div. You can see an example of it at mahaffey.hhvisualgroup.com. The area, in question, is the flash map with the bullets.

This is a basic 2 column fixed-width layout(this page does not need to scale). i have a header(#header), a left column(#subNav - floated left), a right column(#content - floated right), and a footer(#footer) which clears the floats - all wrapped in a div. Inside of "<div id="content">" i have another div called "flashMap" which holds the embedded flash file. The problem is either the #content or #flashMap or both. When #content is floated Safari and Opera add padding causing it to shift about 8px. When i use an absolute and relative position on these 2 rules, everything displays properly in all browsers. The downfall is that the wrapper and footer div no longer grows as the #content expands.

I can post any files or code needed, although all the html/css can be viewed in firefox. I am used to having to get IE7 to behave. I cannot figure out why this works fine in FF but not Safari or Opera. UG! please help!

i would be so grateful if anyone could help me out on this. It would really dig me out of a bind. I suppose i could use absolute and relative position for the demo. It just happens to be for a mac company. Figures.

thanks!
TheShade001 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 04-29-2008, 02:47 PM Re: [float problem] Safari/Opera adding extra padding?
LadynRed's Avatar
Super Moderator

Posts: 6,570
Location: Tennessee
Put a width on #flashmap for one thing. When you float something, you MUST define a width. When you don't, you're tempting the browser demons to calculate - and you don't want them to do that.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 04-29-2008, 02:52 PM Re: [float problem] Safari/Opera adding extra padding?
Junior Talker

Posts: 3
thanks for the reply! yeah, i must have forgotten to add that back after some experimenting. I re-added the width, although it has no effect. Safari/Opera still seems to be adding extra padding on the right.

thanks again for the reply.
TheShade001 is offline
Reply With Quote
View Public Profile
 
Old 04-29-2008, 03:04 PM Re: [float problem] Safari/Opera adding extra padding?
LadynRed's Avatar
Super Moderator

Posts: 6,570
Location: Tennessee
Hmm... ok.. why are you floating #flashmap ? #content is 523px wide, the map is 516px wide. Why not just put margin: 0 auto; on #flashmap so it centers it within #content ?
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 04-29-2008, 03:15 PM Re: [float problem] Safari/Opera adding extra padding?
Junior Talker

Posts: 3
that is, precisely my delimma. I can't set the margins to auto because if #flashMap was centered in #content it would not line up to the nav bar. It needs to be positioned directly under the nav bar.

Since #content is 523px wide, when it floats right, the left side of #content is perfectly lined up with the nav bar. Hence the float: left; on #flashMap.

bummer.

thanks again!
TheShade001 is offline
Reply With Quote
View Public Profile
 
Old 04-29-2008, 03:23 PM Re: [float problem] Safari/Opera adding extra padding?
LadynRed's Avatar
Super Moderator

Posts: 6,570
Location: Tennessee
Opera has VERY few bugs, and I"m not sure if any of these apply any more, but you can check them out:
http://www.positioniseverything.net/op-omnibus.html
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to [float problem] Safari/Opera adding extra padding?
 

Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14620 seconds with 12 queries