Drezard Posted February 26, 2008 Share Posted February 26, 2008 I've been trying to work out the HTML/CSS for a few hours now but, I cant seem to get it right. I just want to split an HTML page into two distinct parts using frames. except, i don't want the giant frame, i just want a table border. What would be the HTML/CSS for this? I have tried using div layers, frames and other things but, I cant seem to get it right. Any help please? Dan Quote Link to comment https://forums.phpfreaks.com/topic/93093-frames-help/ Share on other sites More sharing options...
beebum Posted February 26, 2008 Share Posted February 26, 2008 I'm just learning CSS myself but I've noticed that one of the more popular methods of arranging information on a page is with tables and even tables inside tables. I've seen some nice looking sites done this way. I've been experimenting with it while I learn CSS. As I understand tho, we need to learn how to affectively use DIVs. Quote Link to comment https://forums.phpfreaks.com/topic/93093-frames-help/#findComment-476940 Share on other sites More sharing options...
haku Posted February 26, 2008 Share Posted February 26, 2008 I can't express how much you should really be avoiding using both tables (and especially tables within tables) and frames in your code. Drezard: I'm sorry, I dont really get what you mean. Quote Link to comment https://forums.phpfreaks.com/topic/93093-frames-help/#findComment-476995 Share on other sites More sharing options...
beebum Posted February 26, 2008 Share Posted February 26, 2008 haku, Do you recommend using DIVs? It seems many people are recommending this. Quote Link to comment https://forums.phpfreaks.com/topic/93093-frames-help/#findComment-477001 Share on other sites More sharing options...
haku Posted February 26, 2008 Share Posted February 26, 2008 Yes and no. I recommend separating sites into 3 different things: content (HTML/XHTML), markup/design (CSS), and function (javascript). Each of these things should be in their own pages, and other than references to the external pages that the javascript and css are saved in, you shouldn't see any css or javascript references at all in the content page. So why do I say yes and no? Well when you speak of divs, you are probably thinking of using divs and CSS vs. tables. I think that using divs and css is definitely better than tables. However, people get hooked on DIVS and end up with what is known as 'divitis' - an overuse of divs. They end up using divs (and usually P's) for absolutely everything. This, while better than tables, is still not the greatest coding. Semantic coding is the best - that is to say using tags that match the content that are contained in them. Here is a list of the various XHTML tags: http://www.devguru.com/technologies/xhtml/index.asp What this means is that divs are used for dividing up parts of a page - for example the header, left column, right column and footer. P's are used for paragraphs. H1s, h2's, h3's and so on are used for headers. Q's are used for inline quotes, and 'blockquote' is used for blocks of quotes. There is much more to this. It may not seem that it matters to a computer whether the tag matches the content, but actually using more semantic (apparently) helps with SEO. It also (apparently) helps with screen readers for those who are blind. It also makes for easier to read code, as you can see what the code is, rather than having to guess because everything is in a DIV. This may all seem like a lot of work, but honestly, once you get good at everything (which Im not by the way!), it gets easier and quicker to code your sites, and you will grow to love it all. I would suggest buying some books on CSS to start. Usually you can learn proper XHTML somewhat while you learn CSS. Also, start making sure that your pages are valid (go here and enter each page that you are working on, and it will tell you the errors that you have). Valid code is easier to apply CSS to. If your code isn't valid, weird things can happen with your CSS. Finally, google unobtrusive javascript (if you use javascript) and learn how that works. Good luck! Quote Link to comment https://forums.phpfreaks.com/topic/93093-frames-help/#findComment-477013 Share on other sites More sharing options...
beebum Posted February 26, 2008 Share Posted February 26, 2008 haku, Thanks for all the advice. This gives me allot more direction now as I learn. Quote Link to comment https://forums.phpfreaks.com/topic/93093-frames-help/#findComment-477027 Share on other sites More sharing options...
haku Posted February 26, 2008 Share Posted February 26, 2008 No worries! It may seem a little overwhelming at first, but its good to have the big picture so you know both where you are going, and why you are doing what you are doing. It will also help you decide what is good to spend time learning and what isn't. I really cannot stress how much tables shouldn't be used to lay out a page. Tables have their place semantically - to lay out data that is tabular in nature. Examples are calendars, or anything that cross references two categories to give data (which is basically what a table is). In this case, using a table is using it semantically. The tag matches the data. But using tables to layout pages is not semantic, as page layout is not tabular in nature. On top of this, using tables is messy code, increases gross load time, and takes longer to update with more instances of error. So good luck with the Divs and the CSS! Quote Link to comment https://forums.phpfreaks.com/topic/93093-frames-help/#findComment-477038 Share on other sites More sharing options...
beebum Posted February 28, 2008 Share Posted February 28, 2008 Here is my site after switching from tables to div/css. I'm already liking the div/css approach much better. http://tyson.homeunix.org/ I still have allot to learn and allot of work to do but it is going much better now. Quote Link to comment https://forums.phpfreaks.com/topic/93093-frames-help/#findComment-479077 Share on other sites More sharing options...
haku Posted February 28, 2008 Share Posted February 28, 2008 Nice. Keep it going! Quote Link to comment https://forums.phpfreaks.com/topic/93093-frames-help/#findComment-479148 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.