Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi Just a question, IE6 CSS 2 :

Status
Not open for further replies.

Ecniv

Programmer
Nov 18, 2002
93
EU
Hi

Just a question, IE6 CSS 2 :

If you put the following :
Code:
	border: 1px 1px 1px 1px;
	border-style: dashed;
	border-color: #5D7CEF;

It borders in a dash.

If you put the following :
Code:
	border-style: dashed;
	border-color: #5D7CEF;
	border: 1px 1px 1px 1px;

It doesn't.

Anyone wanna tell me why please??

Vince
 
Hi,

I think CSS wants things done in a certain order, but I'm not 100% sure on what it is all the time. That problem also occurs when doing links.

This works
a:link {font-family, etc etc etc}
a:active {font-family, etc etc etc}
a:visited {font-family, etc etc etc}
a:hover {font-family, etc etc etc}

But this doesn't
a:active {font-family, etc etc etc}
a:link {font-family, etc etc etc}
a:hover {font-family, etc etc etc}
a:visited {font-family, etc etc etc}

So I would just assume that certain things need to be called in a certain order for them to be done. I know this is pretty vague and I'm not that sure myself but the logical explanation is the way things are ordered.
greenjumpy.gif
NATE
design@spyderix-designz.com
 
oops.. see what happens when you start typing and walk away for a minute.

great example with the link properties Nate. I think we all see that one quite often here I dare to learn more
admin@onpntwebdesigns.com
 
What happens is anything you don't declare in the border: attribute is set to the default, so this is what happens:
Code:
border-style: dashed;     element border style changed to dashed
border-color: #5D7CEF;    element border color changed to whatever
border: 1px 1px 1px 1px;  border attribute mis-used, no color or style specified so it assumes defaults, ie white and solid and 1px width

The border attribute expects a single size for all 4 sides, a color, and a style. ie
Code:
border:1px dashed #5D7CEF;

to correct this (in any order):
Code:
    border-width: 1px 1px 1px 1px;
    border-style: dashed;
    border-color: #5D7CEF;
or
Code:
border:1px dashed #5D7CEF;

-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top