Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Firefox and Horizontal Ruled Lines i.e. HR tag

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-26-2006, 06:03 AM
 
DanUK DanUK is offline
 

X-Adept
  
Join Date: Dec 2003
Location: UK
Posts: 800
 

Default Firefox and Horizontal Ruled Lines i.e. HR tag

OK, for those smarter than myself at all things CSS, what is rthe best way to get a <HR> tag to display in colour in both IE (easy) and Firefox (mixed results!). I've been reading the information on:

http://www.computergripes.com/firefoxsites.html

about Horizontal Ruled Lines (3/4/ way down the page) and there doesn't seem to be any hard and fast rules other than trying to trick firefox into displaying a coloured line. For example:

Code:
HR{ COLOR: #FF9C39;}

in the stylesheet gives these outputs depending on use of the hr tag:

Code:
<hr> IE: orange Firefox:no color <hr color="green" > IE: orange Firefox: orange <hr style="background-color: green;"> IE: orange Firefox: no color <hr style="background-color:green;" size="5"> IE: orange Firefox: green

the second one is what the author defaults to, actually giving the hr tag a color attribute which then forces firefox to then override it with the stylesheet attribute! Also from that page, someone has said (as an example):

Code:
hr {color: orange} hr {border-width: 7px; border-style: solid; border-color: orange

i.e. specified twice in the stylesheet, gets it to work in both IE and firefox.

What should I be using?

Thanks

Dan
__________________
4.4.2

and

4.6.1
Reply With Quote
  #2  
Old 01-26-2006, 06:12 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Use whatever works Also, as a general rule, don't use color names for colors but their hex colors.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 01-26-2006, 06:18 AM
 
DanUK DanUK is offline
 

X-Adept
  
Join Date: Dec 2003
Location: UK
Posts: 800
 

Default

Lol, Thanks Balinor. Yes I know about the colour names etc, was only quoting verbatim from the website. What do you use then?

Thanks

Dan
__________________
4.4.2

and

4.6.1
Reply With Quote
  #4  
Old 01-26-2006, 06:30 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

I typically don't use <hr> tags, but when I do I just leave them as the default grey. If I want a colored line I will use a 1px high table cell with a background color instead.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 01-26-2006, 06:34 AM
 
DanUK DanUK is offline
 

X-Adept
  
Join Date: Dec 2003
Location: UK
Posts: 800
 

Default

Thanks, I'll give that a try!

Dan
__________________
4.4.2

and

4.6.1
Reply With Quote
  #6  
Old 01-26-2006, 07:14 AM
 
DanUK DanUK is offline
 

X-Adept
  
Join Date: Dec 2003
Location: UK
Posts: 800
 

Default

Actually, just found this on the web and it's giving consistent results now from the stylesheet.

Code:
HR { color: #FF0000; background: #FF0000; border: 0; Height:1px;}

This is handy for anyone wanting to change the colour of default x-cart <hr> tags and wondering why simple edits to skin1.css don't work in firefox.

Dan
__________________
4.4.2

and

4.6.1
Reply With Quote
  #7  
Old 01-26-2006, 07:15 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Nice
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 04:36 AM.

   

 
X-Cart forums © 2001-2020