HighDots Forums  

CSS Custom Borders

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss CSS Custom Borders in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dy
 
Posts: n/a

Default CSS Custom Borders - 02-04-2006 , 05:25 AM






Hi all

I'm trying to creat a custom border like this:

#container {
width:770px;
background: url(images/background.gif) repeat-y;
padding:0; margin:0;
}

The customer image has the left and right border, each side's border is
10px.

Therefore I've created the #main and #rightnav with margins of 10px.

While it displays correctly on MS IE6, it doesn't display the border at
all on Opera, Netscape or Firefox.

The margin attributes should be transparent, so what am I doing wrong.

Thanks in advance


Reply With Quote
  #2  
Old   
Barbara de Zoete
 
Posts: n/a

Default Re: CSS Custom Borders - 02-04-2006 , 05:28 AM






On Sat, 04 Feb 2006 11:25:46 +0100, Dy <dyangraham (AT) hotmail (DOT) com> wrote:

Quote:
I'm trying to creat a custom border like this:

#container {
width:770px;
background: url(images/background.gif) repeat-y;
padding:0; margin:0;
}

The customer image has the left and right border, each side's border is
10px.

Therefore I've created the #main and #rightnav with margins of 10px.

While it displays correctly on MS IE6, it doesn't display the border at
all on Opera, Netscape or Firefox.

The margin attributes should be transparent, so what am I doing wrong.

This really makes no sense to me. Please provide URL so we can se the
problem child.

--
______PretLetters:

Reply With Quote
  #3  
Old   
Dy
 
Posts: n/a

Default Re: CSS Custom Borders - 02-04-2006 , 05:35 AM



Here you go:

http://www.red-enet.com/essenceofspain/

Looks great on IE6 - doesn't work on Opera, Firefox or Netscape.

Thanks!


Reply With Quote
  #4  
Old   
Barbara de Zoete
 
Posts: n/a

Default Re: CSS Custom Borders - 02-04-2006 , 06:49 AM



On Sat, 04 Feb 2006 11:35:19 +0100, Dy <dyangraham (AT) hotmail (DOT) com> wrote:

Quote:
Here you go:
? Please learn how to quote properly:
<URL:http://www.html-faq.com/etiquette/?quoting>

Quote:
http://www.red-enet.com/essenceofspain/

Looks great on IE6 - doesn't work on Opera, Firefox or Netscape.

Might have something to do with the odd div that is before the start tag
of the body element:
<URL:http://validator.w3.org/check?uri=http%3A%2F%2Fwww.red-enet.com%2Fessenceofspain%2F>

Didn't look any further. First get that corrected and see what happens
then. Usually with only one mistake, I don't take that very seriously. But
this is a mistake one really shouldn't make. It could make all the
difference, since a browser thrying to render your document will put a
start tag for the body element before that 'premature' div. Hence the
second start tag for the body element could just not be doing anything
anymore.



--
______PretLetters:

Reply With Quote
  #5  
Old   
Steve Pugh
 
Posts: n/a

Default Re: CSS Custom Borders - 02-04-2006 , 07:00 AM




Dy wrote:
Did you validate your code before posting? If so, why do you have a div
outside the body?

Quote:
Looks great on IE6 - doesn't work on Opera, Firefox or Netscape.
Please quote part of the message you are replying to. Not everyone will
have seen the earlier messages in the thread and hence have no idea
what you are talking about.

IE is getting it wrong, as usual. The other browsers are doing what
you've asked them to do.

#main is floated left.
#rightbar is floated right.
Hence #container has its height determined by #top alone.

Floated elements are taken outside the document flow and hence do not
contribute to the height of their parent elements. So your background
image is constrained to a shorter portion of the page. Add an element
with clear: both; after the two columns but inside #container to extend
the parent to encompass the full height of both columns. Then you can
get to work on the real problems such as the fixed font size.

Steve



Reply With Quote
  #6  
Old   
Dy
 
Posts: n/a

Default Re: CSS Custom Borders - 02-04-2006 , 07:02 AM



No - it's not that because I only put that div in for testing.

Anyway - it's corrected and makes no difference

Thanks


Reply With Quote
  #7  
Old   
Barbara de Zoete
 
Posts: n/a

Default Re: CSS Custom Borders - 02-04-2006 , 07:07 AM



On Sat, 04 Feb 2006 13:02:00 +0100, Dy <dyangraham (AT) hotmail (DOT) com> wrote:

Quote:
No [...]
'I don't want to be helped here, really, you know'

<URL:http://www.safalra.com/special/googlegroupsreply/>
<URL:http://www.spartanicus.utvinternet.ie/help_us_help_you.htm>



--
______PretLetters:

Reply With Quote
  #8  
Old   
Dy
 
Posts: n/a

Default Re: CSS Custom Borders - 02-04-2006 , 07:55 AM




Quote:
Please quote part of the message you are replying to. Not everyone will
have seen the earlier messages in the thread and hence have no idea
what you are talking about.

OK - no problem - will do

Quote:
IE is getting it wrong, as usual. The other browsers are doing what
you've asked them to do.

#main is floated left.
#rightbar is floated right.
Hence #container has its height determined by #top alone.

Floated elements are taken outside the document flow and hence do not
contribute to the height of their parent elements. So your background
image is constrained to a shorter portion of the page. Add an element
with clear: both; after the two columns but inside #container to extend
the parent to encompass the full height of both columns. Then you can
get to work on the real problems such as the fixed font size.

I must confess, I was a bit suspicious that IE was getting it wrong -
thanks for your help on this, it works a treat.



Reply With Quote
  #9  
Old   
Windsun
 
Posts: n/a

Default Re: CSS Custom Borders - 02-04-2006 , 10:25 AM



The border has to be on the CONTAINER not the image.

-------------------------------------------------------------------------
"Dy" <dyangraham (AT) hotmail (DOT) com> wrote

Quote:
Hi all

I'm trying to creat a custom border like this:

#container {
width:770px;
background: url(images/background.gif) repeat-y;
padding:0; margin:0;
}
----------------------------------------
#container {
border-left:10px solid #008000; border-right:10px solid #008000;
background-image: url('eossnowflake2a.gif'); background-repeat: repeat;
background-attachment: scroll; padding-left:4px; padding-right:4px;
padding-top:0; padding-bottom:0
}


Quote:
The customer image has the left and right border, each side's border is
10px.

Therefore I've created the #main and #rightnav with margins of 10px.

While it displays correctly on MS IE6, it doesn't display the border at
all on Opera, Netscape or Firefox.

The margin attributes should be transparent, so what am I doing wrong.

Thanks in advance




Reply With Quote
  #10  
Old   
Windsun
 
Posts: n/a

Default Re: CSS Custom Borders - 02-04-2006 , 10:29 AM



"Windsun" <wind-sun (AT) earthlink (DOT) net> wrote

Quote:
The border has to be on the CONTAINER not the image.
NM - I misread your message - thought you were trying to put a border on the
outside overall.

Quote:
-------------------------------------------------------------------------
"Dy" <dyangraham (AT) hotmail (DOT) com> wrote in message
news:1139048746.916852.62700 (AT) g44g2000cwa (DOT) googlegroups.com...
Hi all

I'm trying to creat a custom border like this:

#container {
width:770px;
background: url(images/background.gif) repeat-y;
padding:0; margin:0;
}
----------------------------------------
#container {
border-left:10px solid #008000; border-right:10px solid #008000;
background-image: url('eossnowflake2a.gif'); background-repeat: repeat;
background-attachment: scroll; padding-left:4px; padding-right:4px;
padding-top:0; padding-bottom:0
}



The customer image has the left and right border, each side's border is
10px.

Therefore I've created the #main and #rightnav with margins of 10px.

While it displays correctly on MS IE6, it doesn't display the border at
all on Opera, Netscape or Firefox.

The margin attributes should be transparent, so what am I doing wrong.

Thanks in advance






Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.