Jump to content

Split window without using frame


Guest questionable

Recommended Posts

Guest questionable

Hello everyoneI'm just come accross XHTML. I had gone through the tutorial and some of the links, tried to figure out the answer to my problem with no apparent result.I'm just trying to split the browser into two sections, one on the left and one on the right. Ofcourse this had been done before with frame (in HTML), but this isn't supported in XHTML. So can anyone tell me how to achieve this in XHTML? RegardsNote: I tried to do this with <div>. It end up having the left one on top of the right one. And i'm using firefox to test my webpage at the moment.

Link to comment
Share on other sites

Can't you do it with XHTML also, tried it? Isn't the same thing just with a / for non closing tags?

Link to comment
Share on other sites

Note: I tried to do this with <div>. It end up having the left one on top of the right one. And i'm using firefox to test my webpage at the moment.

This is one way you could split the browser into 2 sections using <div> works in IE and FF... <html><head><style>#leftnavigation { position : absolute; left : 0; width : 150px; margin-left : 10px; margin-top : 20px; color : #000000; padding : 3px;}#content { top : 0px; margin : 0px 0% 0 170px; padding : 3px; color : #000000;} </style></head><body topmargin="0" leftmargin="0"><div id="leftnavigation"><h2>Menu</h2><ul> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Contact</a></li> <li><a href="#">Etc</a></li></ul></div><div id="content"><h2>Sample Content</h2><p>This is the content section of the page. This is the content section of the page. This is the content section of the page. This is the content section of the page. This is the content section of the page. This is the content section of the page. This is the content section of the page. This is the content section of the page. </p></div></body></html>
Link to comment
Share on other sites

I'm not a big fan of absolute positioning. I used it about 2 years ago before I learned about floating, and I haven't used it since :)In my opinion, something like this would be better:#left {float: left;other styles here}#right {float: right;other styles here}

Link to comment
Share on other sites

Sure, it's easier to show than explain, so I'll reply back with a sample page to show you after I create one :)Edit:  Have a look at this page http://clifford.excelitehost.com/tests/float.htmlAfter you look at it, view the page source for the code.

It becomes all messed up when you resize the browser window. :)
Link to comment
Share on other sites

What browser are you using?I've checked all these sizessizes6il.pngin the following:Internet Explorer 6.0Mozilla Firefox 1.5Opera 8.51And it looks fine in all of the different resolutions I tested it in.The only problem I see is when you go smaller than 640x480, but since there isn't a current offical resolution below that size, there is a very very small chance that someone is going to make their browser smaller than 640x480.So, there is no problem when it comes to resizing your browser based on the tests I have preformed.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...