473,549 Members | 4,476 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Odd border + padding behavior: cross-browser

Hi all,

I've trolled through Google, a little of evolt, css-discuss archives,
and sent the list a request, all to no avail. I consulted
positionisevery thing.net and quirksmode.org. The issue I have seems
simple enough that I'd have turned it up on any of those sources, but,
alas, that's not the case.

So, please refer to

http://www.erectlocution.com

for the page in question. Here are the issues:

(a) IE 6

This browser has some issues rendering the page. The borders of the
div with ID #contentWrapper render fine on initial loading, but there
is a portion of each of the right and left borders which isn't rendered
"below the fold", i.e. below the bottom of the rendered page, which is
evident on vertical scrolling. This behavior also occurs when
scrolling back up--the previously rendered border at the top of the
page is poorly rendered.

Additionally, when mousing over a link, the border rendering becomes
differently, if predictably, broken: some part of the left and right
borders of #contentWrapper disappear, starting around 100px below it's
top edge and 50px or so above its bottom edge. It's easily
reproducible, for me anyway.

Lastly--and this is probably somewhere on quirksmode.org or
positionisevery thing.org, but of
lower priority for me--there is a gap of something like 3px between the
#header div and the
#contentWrapper div. This happens whether or not I feed IE special
rendering instructions via conditional comments.

(b) Firefox 1.0.7 / WinXP and Mac OS X

There is a gap of about 15px between the #header and #contentWrapper
divs rendered via Firefox. I have scoured through the fairly anemic
CSS and not found any reason for this in the code itself. Both the
XHTML and CSS validate, for what it's worth. I had applied a negative
margin, which, for FF, worked perfectly, but which caused Safari to
display part of the right border overlapping the header by those 15px.
Safari, then, renders the page better than anything else I've tried.

Overall, it's not critical faultiness; but I'd really like such a
simple site to render nicely. I appreciate any tips and pointers along
the way.

Thanks,

Daniel

Nov 4 '05 #1
11 2444
Well, I can see no problems in FF 1.5, but Netscape and opera both show
the gap you describe for firefox. I find it interesting that the gap is
the same size as the gap you define in the conditional IE statement.

IE 6 shows the borders missing on the sides, about in the area you
describe - but on my browser, it loads that way and stays that way. And
it has nothing to do with where the page border is.

I don't know if this will help, or how much - but I have noticed that
leaving off the unit in FF tends to cause issues, and you have done
exactly this on a number of your paddng and margin definitions -
basically, all the '0' ones. It may not even be relevant, but I would
start there.

As for the display of the side margins in IE - it looks like you are
defining them with floats - that is probably causing them to overlay
the border of contentWrapper when they're displayed. You might want to
try adding a margin - see if you can pull them in a bit.

I can't promise any of that will help, but that's at least where I
would start if I were fixing it. Also, I would endeavor to get rid of
the conditional definitions (but I can understand why they may be
necessary).

Hope that's at least SOME help...

Nov 4 '05 #2
Hey, Tony,

I very much appreciate this. I know the css-discuss list is
high-volume; but I'd figured that I would probably have had
<em>some</em> kind of response in a week or so. Oh well.

I'm a little concerned that the gap is there for FF 1.0.7 given that FF
1.5 penetration is probably kind of low still. I know Netscape is a
Gecko-based browswer, and whatever "feature" is causing the gap might
be shared by FF lt 1.5 and Netscape. However, I'm not personally to
aware of Opera's place in the browser code gene pool.

The borders don't concern me quite as much, but I don't want to shun IE
users if a relatively easy fix works.

Thanks again. This is at least a direction to head. I tried plumbing
through the Firefox Bugzilla database for something, but that proved
pretty daunting as an issue with phantom spacing is kind of generic.

Daniel

Nov 4 '05 #3
So, well, I tried providing units for every measurement, to no great
affect. If anything, it seemed to stabilize IE 6's rendering of the
borders, such that they're mostly messed up without changing. I've
played with a few different values of floated-element width, margin,
and padding on the containing element, to no avail. I know I'm hacking
at my balsa wood with a machette and expecting something pretty.

Has anyone else ever noticed IE "unrenderin g" borders as you scroll?

I might need to get FF 1.5, but I want this to work properly in 1.0.7
still. And then there are the Netscape and Opera issues, neither of
which I have.

Nov 4 '05 #4
mu****@yahoo.co m wrote:

http://www.erectlocution.com

(a) IE 6

This browser has some issues rendering the page.


IE sucks when it comes to CSS, but there are 2 things that can cure a
whole pile of bizarre behaviors:

position: relative;
zoom: 1.0; (a proprietary property that other browsers will ignore)

Try adding position to different elements, containers in particular. If
that doesn't help, try adding zoom. If that doesn't work, go find a
2-column template on the css-discuss site that's already known to work.
<URL:http://css-discuss.incutio .com/?page=CssLayout s>

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Nov 4 '05 #5
Daniel,

Obviously, I'm at work right now, so I can't get into your code too
much, but I'll see if I can take a deeper look over the weekend. I know
I've seen and dealt with similar problems, but the details just aren't
coming to mind at the moment.

Nov 5 '05 #6
mu****@yahoo.co m wrote:

http://www.erectlocution.com
for the page in question. Here are the issues: [...]

I could find no way to get the layout to look as I think you do with
the code as it is. Here is what I changed:
- I removed "contentWrapper " altogether. It is unnecessary.

- "header" and "header img" were changed to:
#header {
height: 46px;
background: url("./t_files/erectlocutionHe aderBG.jpg") repeat-x top left;
margin: 0px;
padding: 0px;

/* Changed: */
width: 720px;
margin: 0px auto;
padding: 0px;
}

#header img {
margin: 0px;
padding: 0px;

/* Changed: */
display: block;
}

- "allContent " was changed to:
#allContent {
width: 720px;
margin: 0px auto;
padding: 0px;
background: rgb(235,235,235 ) url("./t_files/erectlocutionBG White.jpg")
repeat-y top left;

/* Changed: */
border: 1px solid black;
border-top: 1px solid transparent;
}

- To get <h1> to work the same cross-browser you must specify both padding
and margin:
h1 {
padding: 0;
margin: 1em 0;
...
}

- In <body> "header" is placed first, then "allContent ", and
"contentWrapper " removed. Everything else is the same.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Nov 5 '05 #7
Wow. This is a phenomenal effort. I feel like a teenage girl gushing,
but it's just refreshing.

Tony, please do take your time. This is--as the content should
evince--simply personal, and not a client project with a deadline (and,
yes, we should all be a little skeptical if I'd have a client with this
basic a need).

kchaya, I'll certainly play around with that stuff. I'd hate to go too
far to appease one poorly-constructed (from our perspective, anyway)
browser; but if a solution is found after some roughly arbitrary
measures, all of which can eventually be removed as I gather a bit more
sophistication, that'll do. Again, though I've got Zeldman's book
(haven't finished it, and I have precious little time to post at the
moment let alone read his book), and I appreciate the practical appeal
of standards (completely beside the purist's fastidiousness) , I'm happy
if it basically just works for the time being.

Jim, I'd have preferred not to have the extraneous container; but I
felt that, given that I wanted to have the background tile properly
(providing the vertical separator via faux columns, and with my use of
the horizontal background image providing the faux border to the top of
the page), a container would suffice [NOTE: I'm leaving that, but I
now realize that I have that bg image tiling in the #allContent div,
and not the other]. I get the feeling that you may have used the
Firefox Web Developer extension and toyed with the CSS till it worked,
which I'd considered doing myself. I generally (and a little guiltily)
work on the site from work, so I wasn't comfortable going too far, and
I very much appreciate the lengths to which you went to provide what
should be an improved user experience. I'll try your changes this
weekend and see what I can do.

Thanks again, folks. A fairly humbling and educational experience so
far.

Daniel

Nov 5 '05 #8
In message <11************ **********@g43g 2000cwa.googleg roups.com>,
Daniel Black <mu****@yahoo.c om> writes
So, well, I tried providing units for every measurement, to no great
affect. If anything, it seemed to stabilize IE 6's rendering of the
borders, such that they're mostly messed up without changing. I've
played with a few different values of floated-element width, margin,
and padding on the containing element, to no avail. I know I'm hacking
at my balsa wood with a machette and expecting something pretty.

Has anyone else ever noticed IE "unrenderin g" borders as you scroll?

I might need to get FF 1.5, but I want this to work properly in 1.0.7
still. And then there are the Netscape and Opera issues, neither of
which I have.

Download Opera (it's free) from http://www.opera.com/download/

--
Chris Hughes
"Reality is that which, when you cease to believe, continues to exist."
http://www.epicure.demon.co.uk
Nov 5 '05 #9
Jim,

It works like a charm thus far. Thank you very much. I need to figure
out why my content widths, padding, and margins seemed to have been
screwing everything up, at least compounded by the extra <div>. It
shouldn't have created problems, though, logically, since it had no
padding or margin. Then again...

Thanks again,

Daniel

Nov 7 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

33
27706
by: Thomas Mlynarczyk | last post by:
Hi, I'm looking for a way to put a 1px solid border around the image in this link: <a href="some.html"><img src="some.gif"></a> Well, that, by itself, is simple. However, I would like to have a different border color for a mouse hover effect over the image. With Mozilla, I can simply specify img:hover {...}, but IE allows hover only for...
0
1827
by: Red | last post by:
This is apparently an ie display bug, I can't seem to figure out which ie bug this is. a 3 sided border is created by wrapping the 'inner' box in the 'middle' box and padding the 'middle' box 1px on 3 sides. It looks the same in firefox and ie. Then the same box is wrapped in yet another box with a red border on the bottom. In Firefox...
0
4506
by: Red | last post by:
See http://reenie.org/test9.php There are two examples each with three nested divs. The only difference between the two is that the first example has no padding in the inner div, the second has 10px padding in the inner div. The middle div has no padding and its black background should not show up at all.
1
7489
by: Trent L | last post by:
Hello, I'm having a problem where a style for a <a> tag isn't working in IE: border : 1px solid red; If you use my code below, you'll see what I mean. In IE6 on WinXP, I'm not seeing a red top and bottom border. My HTML validates. It looks
6
23544
by: no0bodyhome | last post by:
One of the properties I have is: border-top-width: 30px I'd like to put some text on this border; align it and such. It is part of more complicated floating column text-box I'm working on for a page. Possible, or should I be looking at an alternative method? Thanks
7
41721
by: Bob Bedford | last post by:
I've an image in a cell of a table. I've this CSS: ..dbtable{ width: 600px; padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px; border-collapse: collapse; border: 1px solid #000000;
0
684
by: smokeyd | last post by:
smokeyd Sep 26, 2:12 pm show options Newsgroups: alt.html From: "smokeyd" <tom_bur...@umbro.co.uk> - Find messages by this author Date: 26 Sep 2005 06:12:11 -0700 Local: Mon, Sep 26 2005 2:12 pm Subject: IE/ Firefox CSS Border Problem Reply | Reply to Author | Forward | Print | Individual Message | Show original | Remove | Report...
2
3005
by: tradmusic.com | last post by:
Hi, I'm new to CSS and, following some advice, created my page like this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Title</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
16
3268
by: FuzzyLogik | last post by:
By width, I don't mean weight. I have a row of <li>'s, with a bottom-border. I want the bottom-border to only go 90% of the <li> (centered) Is there any way to do this? I have it in this format: CSS: li {
14
1700
by: Mark Shroyer | last post by:
I just noticed an unintuitive aspect of how nested blocks are positioned under a specific set of conditions, and although this is ostensibly correct behavior (unless Firefox, Safari, and Opera are all three simultaneously wrong about this particular quirk), I'm having a hard time figuring out the underlying premise of this behavior. ...
0
7526
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
1
7480
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7814
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5373
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3504
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3486
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1949
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1063
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
769
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.