PDA

View Full Version : CSS border problem


garfield_101
02-15-2003, 11:56 AM
HI! i would like to ask here, why is it when i use the border: 2 px inset green inside the body tag in my css file, the netscape show a different border but correct colors? netscape wrapped it only to how much the text is in the webpage instead of bordering it in the whole screen? how do i make it compatible with netscape so the border will appear as the one in internet explorer.
also, how do i make it so when i click a button form it will open a webpage centered in the monitor's screen to work in the netscape? I know about the width and height paramter. SO how do i do it?
how do i create a link that will open a link in my website and then scroll to a certain paragraph within that same link that i clicked?
Thanks for the time spent in reading my post.

pb&j
02-15-2003, 01:36 PM
I don't think there will be a Netscape fix to your first problem showing a different style. What version of Netscape are you testing on? As for the width, you may have to put the text into a table, set the width to 100% and apply the border to the table.

The second question, I don't know about.

The third question sounds like an anchor link.

<a name="SomeWord">Stop Link at this spot</a>

<a href="WebPageName#SomeWord">Goto that spot link</a>

garfield_101
02-16-2003, 12:15 AM
i am testing it in netscape 6? So does that mean that i have to create a table with the whole webpage that i created originally without the table? THAT WOULD BE HARD! wouldnt it also affect how my design in IE looks like?
Thanks for answering the 3rd question!

meow
02-16-2003, 03:30 AM
Try this:

html,body { border: 2px inset green }
html > body { border: none } /* IE doesn't understand this */

I don't think a IE hack is needed really but I don't have 6 installed so you have better check what it does in Standards Mode. ;)

brothercake
02-16-2003, 03:31 AM
IE doesn't support any of the new selectors, including that one, in any mode.

meow
02-16-2003, 03:32 AM
That's the point. :)

[--EDIT--]
I was worried that IE6 would do something with border on HTML.

garfield_101
02-17-2003, 01:31 PM
"html,body { border: 2px inset green }
html > body { border: none } "
what does this mean? do i place this in the css file or in the css body tag within the css? is there a way such that even if there is no text inside the webpage the border will exactly be on the four corners of the webpage window? i notice if i use this and I DO have text inside then it only wraps it to the text within it? What i would like is that if i have that border then even if i scroll the window that border will stay in place and won't move in netscape? Why does IE do this so perfectly?

meow
02-17-2003, 05:20 PM
Sorry. me typoed it wrongly. NO SPACES around the ">". :o
html,body { border: 2px solid green }
html>body { border: none } /* IE doesn't understand this */

In IE BODY corresponds to the browser window. In Moz and Opera HTML does.

"html, body" sets a border on both HTML and body
"html>body" is a child selector and IE doesn't understand it written this way. It takes the border on body away again in more savvy browsers.
And yes, you put in in your CSS.

Works now? :)