...

View Full Version : CSS Border behavior in browsers



Jesper Møller
05-31-2010, 09:35 PM
I have a little question abouth CSS Border behavior in difrent browsers

If i have set some border style like this

div {
border-top-widht: 10px;
porder-top-style: solid;
}

div.somename {
border-widht: 0 10px;
porder-style: dashed;
}

and then later writes

div {
border-color: #00ff00;
}

Will anny browser make a border all around the divs ???
(Can a border color trick anny browser to make a border if width and/or style is not set ?)

optimus203
06-01-2010, 12:24 AM
You spelled width incorrectly which will cause issues. IE might have some issues: http://www.webcredible.co.uk/user-friendly-resources/css/internet-explorer.shtml

Jesper Møller
06-01-2010, 06:43 AM
You spelled width incorrectly which will cause issues. IE might have some issues: http://www.webcredible.co.uk/user-friendly-resources/css/internet-explorer.shtml

Oh .. Sorry for that ... that was deffently not my intension :rolleyes:


But what if ihad spelled all corectly ?
Can a border color trick anny browser to make a border if width and/or style is not set ?

effpeetee
06-01-2010, 08:18 AM
It is a good idea to put this code at the very start of your CSS.


*{ padding:0;
margin:0;
border:0;}


It makes sure that the browser is reset to zero before it deals with you css code.

Frank
Frank

abduraooft
06-01-2010, 09:20 AM
Can a border color trick anny browser to make a border if width and/or style is not set ? How about having a test at your end using all major browsers available?

Jesper Møller
06-01-2010, 02:15 PM
How about having a test at your end using all major browsers available?

I woud love to test in IE if i had IE for my mac ;)

I have done some testing ... but i was thinking perhaps someone have had anny experience with border color trick anny browser to make a border if width and/or style is not set

optimus203
06-01-2010, 03:04 PM
I run a mac too. Look at http://winebottler.kronenberg.org/ , which lets you run IE6-8 on mac, and also check out http://www.browsershots.org

Jesper Møller
06-01-2010, 04:26 PM
thanks for the link http://winebottler.kronenberg.org/ ill look into that :thumbsup:

I know browsershot .. but think its very slow .. have a lot of browseres but is very slow to use
For explore test i more use http://www.ipinfo.info/netrenderer/ ;)

Jesper Møller
06-01-2010, 04:30 PM
But it stil dosnt answer my actualy cuestion I proberly didnot askd it proberly (sorry for that, my english is not that god)

Ill try to refraise it:

If one only specify border-color .. is a browser supposed to make a border even if there is not specifyd width and/or style ??? ...

met
06-01-2010, 05:49 PM
div { border-color:red; } will apply the color red to any div with a border.

if you don't specify a width/style then you won't see the border, but it would be red if you had.

Jesper Møller
06-01-2010, 07:13 PM
Thank you :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum