3 replies [Last post]
drru
Offline
newbie
Last seen: 14 years 11 weeks ago
Timezone: GMT+1
Joined: 2006-05-19
Posts: 2
Points: 0

Ok, i have modified water & stone template for Mambo. Works fine in IE, but problem is in Firefox and Opera. Imagine one table with 5 pixels border. How can I manage the position of that border with css? Border can be "around" table, "inside" table etc..... If the table had 500 px width, firefox shows 510 pixels ( 5 px left border + 500 pixels table + 5 pixels right border) !
I don't want that. I want that complete table with borders has 500 pixels.
It was just an example.
So, can I manage border positions with css only for Firefox and Opera, and how to do that?

Thanx

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 7 years 45 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

5px border problem in Firefox and Opera

Its a box model issue. Give your page a doctype then IE will make the table 510px wide too. Now since they are all the same, give the table a width of 490px.

drru
Offline
newbie
Last seen: 14 years 11 weeks ago
Timezone: GMT+1
Joined: 2006-05-19
Posts: 2
Points: 0

5px border problem in Firefox and Opera

this is on the begining of index.php:

<?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
// needed to seperate the ISO number from the language file constant _ISO
$iso = explode( '=', _ISO );
// xml prolog
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

What should I change?

Thank You for the reply

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 22 hours 12 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9761
Points: 3843

5px border problem in Firefox and Opera

Remove this:

// xml prolog
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>'; 
Anything preceeding the DTD throws IE into quirks.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.