473,394 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

CSS Custom Borders

Dy
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

Feb 4 '06 #1
9 2609
On Sat, 04 Feb 2006 11:25:46 +0100, Dy <dy********@hotmail.com> wrote:
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:
| weblog | http://www.pretletters.net/weblog/weblog.html |
| webontwerp | http://www.pretletters.net/html/webontwerp.html |
|zweefvliegen | http://www.pretletters.net/html/vliegen.html |
Feb 4 '06 #2
Dy
Here you go:

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

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

Thanks!

Feb 4 '06 #3
On Sat, 04 Feb 2006 11:35:19 +0100, Dy <dy********@hotmail.com> wrote:
Here you go:
? Please learn how to quote properly:
<URL:http://www.html-faq.com/etiquette/?quoting>
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:
| weblog | http://www.pretletters.net/weblog/weblog.html |
| webontwerp | http://www.pretletters.net/html/webontwerp.html |
|zweefvliegen | http://www.pretletters.net/html/vliegen.html |
Feb 4 '06 #4

Dy wrote:
Here you go:

http://www.red-enet.com/essenceofspain/
Did you validate your code before posting? If so, why do you have a div
outside the body?
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

Feb 4 '06 #5
Dy
No - it's not that because I only put that div in for testing.

Anyway - it's corrected and makes no difference

Thanks

Feb 4 '06 #6
On Sat, 04 Feb 2006 13:02:00 +0100, Dy <dy********@hotmail.com> wrote:
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:
| weblog | http://www.pretletters.net/weblog/weblog.html |
| webontwerp | http://www.pretletters.net/html/webontwerp.html |
|zweefvliegen | http://www.pretletters.net/html/vliegen.html |
Feb 4 '06 #7
Dy
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 :)
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.

Feb 4 '06 #8
The border has to be on the CONTAINER not the image.

-------------------------------------------------------------------------
"Dy" <dy********@hotmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.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

Feb 4 '06 #9
"Windsun" <wi******@earthlink.net> wrote in message
news:0I******************@newsread2.news.pas.earth link.net...
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.

-------------------------------------------------------------------------
"Dy" <dy********@hotmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.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


Feb 4 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Hostile17 | last post by:
I've been trying to figure out a good way to make a CSS layout with nice-looking 1-pixel borders around the table cells. The only broadly compatible way to do this I know of is to have * the...
0
by: Mike Pierson | last post by:
Hello all: I have a C# windows application that needs a custom calendar. I need this calendar displayed as a month view. I also need the ability to insert/manipulate images and text into each...
3
by: Nick Haines | last post by:
I need to write my own custom text edit control.. but I'm not sure where to start - I've never written a custom control... the features I want are somewhat similar to the VS .Net text editor - text...
3
by: Kyle Fitzgerald | last post by:
I've started a web control library project and can build my own controls to add to the toolbox in the .NET environment. The problem I'm having is I want to create a control just like the HTML...
1
by: Sanjay Pais | last post by:
I am using .NET 2005 Beta 2. I need to create a custom property for a text box like this. My custom property is called ApplySecurity. <asp:TextBox ID="txtTextBox1" ApplySecurity="True"...
1
by: Andrew Hayward | last post by:
I have a custom form, with all borders, title bar, etc. being drawn internally. Native borders and so on have been disabled. Because of this, however, resizing is a bit of a problem, and generally...
0
by: diatom | last post by:
Hello, In a windows application, I just created a new custom user control. This custom user control is simply a dialog that I want to re-use. When my dialog opens, by default it is located in...
9
by: Michael Redbourn | last post by:
Hi, I just switched from FP to DW and am very very happy ! So whilst I'm mastering Dreamweaver (gonna be a while yet :-) - I thought that I'd try and find out how to add borders for browers...
2
by: nicstel | last post by:
Hello, I'm trying to find documentation about the xlwt (py_excelerator). I want to change the border of some cells. But the only types that I found is: double and dashed. How to do a simple line...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.