2 replies [Last post]
florent
florent's picture
Offline
Enthusiast
Paris, France
Last seen: 7 years 51 weeks ago
Paris, France
Timezone: GMT+1
Joined: 2003-04-19
Posts: 96
Points: 0

hello !

i have a non css compliant website at http://bbal.chokebore.net/.

i'm in the process of making it css compliant, pure html 4.01 strict !

work in progress here : http://bbal.chokebore.net/css/

all displays well with ie6, but netscape 7 screws up : the divs are not centered, they are to the left... i tried the work around posted in the tables/boxes forum (margin-left and right : auto) but it doesn't seem to be working...

help !

2nd little problem, still with netscape : there is a one pixel gap underneath my image and the border of the <div class=edge>... how do i suppress it ?

thanks for your help !

I'm a perfectionist
and perfect is a skinned knee

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 2 days 10 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5147
Points: 2745

Center Netscape

Hi Florent,
For the first problem, try setting a width for the containing box.
<div style="margin-left: auto; margin-right: auto; width:540px;">

I still haven't worked out the second problem, the pixel gap at the bottom of the image.
I must say if you didn't mention it I wouldn't have noticed it as a problem. :?

florent
florent's picture
Offline
Enthusiast
Paris, France
Last seen: 7 years 51 weeks ago
Paris, France
Timezone: GMT+1
Joined: 2003-04-19
Posts: 96
Points: 0

netscape 7 doesn't center divs on my site !

thanks tony ! that works !

check out the new version : http://bbal.chokebore.net/css/

i also figured out the "gap below the image" problem myself : instead of using

<div class="edge"><a href="info.html"><img src="images/closedeyes.jpg" width="540" height="400" alt="b. balthazar"></a></div>

(the edge class being defined by .edge {border:1px solid #000000;padding:0px;margin-bottom:10px})

i used

<div><a href="info.html"><img src="images/closedeyes.jpg" width="540" height="400" alt="b. balthazar" style="border:1px solid #000000;padding:0px;margin-bottom:10px"></a></div>

(setting the border to the img and not the div...)

I'm a perfectionist
and perfect is a skinned knee