Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-24-2003, 05:00 PM   PM User | #1
angiras
Regular Coder

 
Join Date: Dec 2002
Location: France
Posts: 522
Thanks: 0
Thanked 0 Times in 0 Posts
angiras is an unknown quantity at this point
border & percentage

it seems that Internet explorer and Mozilla doesn't recognize

border:1% solid #F6F7EB;

it works fine for Opera


do you know why ?
angiras is offline   Reply With Quote
Old 12-24-2003, 07:00 PM   PM User | #2
me'
Senior Coder

 
Join Date: Nov 2002
Location: Warwickshire, England
Posts: 1,229
Thanks: 0
Thanked 0 Times in 0 Posts
me' is an unknown quantity at this point
Are you sure? It seems fine based on the CSS spec, although you have to be careful with percentages. Is it a vertical, horizontal or both borders that aren't recognised?
__________________
David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!
me' is offline   Reply With Quote
Old 12-24-2003, 07:31 PM   PM User | #3
angiras
Regular Coder

 
Join Date: Dec 2002
Location: France
Posts: 522
Thanks: 0
Thanked 0 Times in 0 Posts
angiras is an unknown quantity at this point
just try and see

<?xml version="1.0" encoding="iso-8859-1"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" style="width:100%;height:100%;padding:0px;border:0px;margin:0px;">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>titre</title>
</head>
<body style="width:100%;height:100%;padding:0px;border:0px;margin:0px;background-color:ivory;">
<form id="MainForm" style="width:100%;height:100%;">
<div style="width:200px;height:100px;border:2% outset #990000;overflow:auto;text-align:center;padding:2%;background-color:tan;position:absolute;top:10%;left:15%;"> content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content content </div>
</form>
</body>
</html>


this works perfectly for Opera , but not at all for Mozilla or IE .. the border of course
angiras is offline   Reply With Quote
Old 12-28-2003, 11:59 PM   PM User | #4
brothercake
Senior Coder


 
Join Date: Jun 2002
Location: near Oswestry
Posts: 4,508
Thanks: 0
Thanked 0 Times in 0 Posts
brothercake is an unknown quantity at this point
Maybe one or two percent is computing to less than one pixel, although clearly it shouldn't. What happens if you try 10% - does that work?
__________________
"Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark
brothercake is offline   Reply With Quote
Old 12-29-2003, 07:22 AM   PM User | #5
angiras
Regular Coder

 
Join Date: Dec 2002
Location: France
Posts: 522
Thanks: 0
Thanked 0 Times in 0 Posts
angiras is an unknown quantity at this point
I have looked in the w3c >>> CSS2
and there is NO percentage for borders !!

:-(((

.....yes I have tried with border:20%;

then it seems totally uncoherent if you want a box total width = 100% with a border !

Last edited by angiras; 12-29-2003 at 07:25 AM..
angiras is offline   Reply With Quote
Old 12-29-2003, 10:09 AM   PM User | #6
me'
Senior Coder

 
Join Date: Nov 2002
Location: Warwickshire, England
Posts: 1,229
Thanks: 0
Thanked 0 Times in 0 Posts
me' is an unknown quantity at this point
Really? I checked, and:
Quote:
<length>
The border's thickness has an explicit value. Explicit border widths cannot be negative.
[quote source]

Doesn't say anything about percentages.
__________________
David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!
me' is offline   Reply With Quote
Old 12-29-2003, 10:17 AM   PM User | #7
angiras
Regular Coder

 
Join Date: Dec 2002
Location: France
Posts: 522
Thanks: 0
Thanked 0 Times in 0 Posts
angiras is an unknown quantity at this point
they say nothing because it doesn't work . look for padding and you will see >>> length or percentage

I hope CSS3 will accept it
angiras is offline   Reply With Quote
Old 12-29-2003, 10:19 AM   PM User | #8
me'
Senior Coder

 
Join Date: Nov 2002
Location: Warwickshire, England
Posts: 1,229
Thanks: 0
Thanked 0 Times in 0 Posts
me' is an unknown quantity at this point
Yeah, it says you can have a length or a percentage for padding, meaning you can have a percentage.
__________________
David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!
me' is offline   Reply With Quote
Old 12-29-2003, 10:27 AM   PM User | #9
angiras
Regular Coder

 
Join Date: Dec 2002
Location: France
Posts: 522
Thanks: 0
Thanked 0 Times in 0 Posts
angiras is an unknown quantity at this point
yes and you cannot for borders :-))
angiras is offline   Reply With Quote
Old 12-29-2003, 10:46 AM   PM User | #10
me'
Senior Coder

 
Join Date: Nov 2002
Location: Warwickshire, England
Posts: 1,229
Thanks: 0
Thanked 0 Times in 0 Posts
me' is an unknown quantity at this point
Okay, I'm with you now!

Wierd.
__________________
David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!
me' is offline   Reply With Quote
Old 12-29-2003, 01:59 PM   PM User | #11
Mhtml
Senior Coder

 
Mhtml's Avatar
 
Join Date: Jun 2002
Location: Sydney, Australia
Posts: 3,531
Thanks: 0
Thanked 1 Time in 1 Post
Mhtml is an unknown quantity at this point
I'm pretty sure that it's not CSS2 at least last I read the CSS2 data I noticed it didn't say anything about it like usual (as you stated).. I never use variable width borders myself but I don't see why they did not include it in the standard.

Perhaps liorean will appear here shortly, he seems to know reasons behind most things..I'd like to know where he gets all his infos from though .
__________________
Omnis mico antequam dominus Spookster!
Mhtml is offline   Reply With Quote
Old 12-29-2003, 02:10 PM   PM User | #12
angiras
Regular Coder

 
Join Date: Dec 2002
Location: France
Posts: 522
Thanks: 0
Thanked 0 Times in 0 Posts
angiras is an unknown quantity at this point
it can be so practicle to write

border:1% solid red;
padding :0.1%;
margin:1%;
width:80%;

if just the border doesn't want all fall down
angiras is offline   Reply With Quote
Old 12-29-2003, 02:17 PM   PM User | #13
Mhtml
Senior Coder

 
Mhtml's Avatar
 
Join Date: Jun 2002
Location: Sydney, Australia
Posts: 3,531
Thanks: 0
Thanked 1 Time in 1 Post
Mhtml is an unknown quantity at this point
I hardly ever do anything beyond;

border: solid 1px #2266AC /* random color */

or

boder: none; /* */

I don't really see the use of a variable border width. Sure I could come up with a situation but fixed width is far more practical and theoretically would speed up load time (although that'd have to be one slow computer/browser combo!) ...
__________________
Omnis mico antequam dominus Spookster!
Mhtml is offline   Reply With Quote
Old 12-29-2003, 02:34 PM   PM User | #14
angiras
Regular Coder

 
Join Date: Dec 2002
Location: France
Posts: 522
Thanks: 0
Thanked 0 Times in 0 Posts
angiras is an unknown quantity at this point
then how do you fix a total box width = 100% , with a border ?


in that way it works >>>

border-width:1% solid red;
padding :1%;
margin:1%;
width:97%;
angiras is offline   Reply With Quote
Old 12-29-2003, 02:35 PM   PM User | #15
me'
Senior Coder

 
Join Date: Nov 2002
Location: Warwickshire, England
Posts: 1,229
Thanks: 0
Thanked 0 Times in 0 Posts
me' is an unknown quantity at this point
Don't set a width. The UA will calculate the correct width.

The float model screws this up though.
__________________
David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!
me' is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:18 PM.


Advertisement
Log in to turn off these ads.