Guest questionable Posted January 24, 2006 Share Posted January 24, 2006 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 More sharing options...
Err Posted January 24, 2006 Share Posted January 24, 2006 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 More sharing options...
Eric Posted January 24, 2006 Share Posted January 24, 2006 You can use frames in XHTML too. You just need to use the Frameset DTD <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> Link to comment Share on other sites More sharing options...
scott100 Posted January 24, 2006 Share Posted January 24, 2006 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.<{POST_SNAPBACK}> 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 More sharing options...
Eric Posted January 24, 2006 Share Posted January 24, 2006 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 More sharing options...
jhsebree1 Posted January 25, 2006 Share Posted January 25, 2006 Eric, can you explain this in more detail? I'm trying to do something similar...I want my heading and links to remain at the top of the browser window as the user scrolls down a long page of text. I'm not a big fan of frames, however. Link to comment Share on other sites More sharing options...
Eric Posted January 25, 2006 Share Posted January 25, 2006 (edited) 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. Edited January 25, 2006 by Eric Link to comment Share on other sites More sharing options...
scott100 Posted January 25, 2006 Share Posted January 25, 2006 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.<{POST_SNAPBACK}> It becomes all messed up when you resize the browser window. Link to comment Share on other sites More sharing options...
Eric Posted January 25, 2006 Share Posted January 25, 2006 What browser are you using?I've checked all these sizesin 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 More sharing options...
scott100 Posted January 25, 2006 Share Posted January 25, 2006 Im using IE 6 s pack 2i checked it in FF and Opera and it looks fine though... Link to comment Share on other sites More sharing options...
Eric Posted January 25, 2006 Share Posted January 25, 2006 Maybe it's an IE bug?I tested IE with the smallest res. to the largest though O_o; Link to comment Share on other sites More sharing options...
scott100 Posted January 25, 2006 Share Posted January 25, 2006 Maybe it's an IE bug?I tested IE with the smallest res. to the largest though O_o;<{POST_SNAPBACK}> Well it wouldn't be the first time would it!! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now