Jump to content

Frames help


Drezard

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.