I was wondering if anyone, who is familiar with HTML, might be able to help me out.
I want to put "boxes" or "tables" on my website and I have no idea how to do that. Tried looking it up, but got even more confused then I am now.
I also am curious on what type of code will allow me to situate things to the right of other things so I don't have a pure verticle website. Thanks for the help in advance.
Private Mod Note
():
Rollback Post to RevisionRollBack
"There are times when the word **** is justified, for example, you are on a crowded underground train, and the gent behind you is gently caressing your buttocks, somehow "Excuse me interrupting what for you is clearly a pleasurable experience but could I ask you politely to desist" does not carry the same urgency as "**** off you pervert." - Bill Connolly
I was wondering if anyone, who is familiar with HTML, might be able to help me out.
I want to put "boxes" or "tables" on my website and I have no idea how to do that. Tried looking it up, but got even more confused then I am now.
I also am curious on what type of code will allow me to situate things to the right of other things so I don't have a pure verticle website. Thanks for the help in advance.
An even better way to make your website more horizontal is to use frames. Frames basically split the screen up into different "websites", each of which loads its own html. For example, you might have a tall frame to one side which contains links (ie, a sidebar), and another in the middle which shows your main content. There are many options for frames - you can set them to have (or not have) borders, scrollbars, etc.
To give an example: I created this website with relatively basic html. Here's what the code that loads the main page looks like:
<html>
<head>
<title>WSU Anime Club</title>
</head>
<frameset rows="107,*" border="0">
<frame name="top" src="Banner.html" scrolling="no">
<frameset cols="280,*">
<frame name="sidebar" src="sidebar.html" scrolling="no">
<frame name="main1" src="homeframe.html">
</frameset>
</frameset>
</html>
Basically this code reads as:
Title
Create a row across the top with no border, 107px tall. With what's left:
Create a column on the left, no border, 280px wide. With what's left:
Create another frame (main content).
The "src" tells it what html page it should load in each frame. The "name" function is just for reference within the page (i.e. telling links which frame to open in), and up to you.
Another approach is a series of div containers with borders and no margins, but that would require CSS, too. It has pitfalls, of course. The table tag is the obvious but no longer "correct" choice.
I just drew up a crude, simple sample of the div border approach; it can be found here. Also, I've always found www.wdvl.com (web developer's virtual library) to be useful.
Oh, and in CSS, the float attribute does the horizontal stuff - I used it in my sample as float: left - and display: inline can do it, too, if you're careful. Other than that, absolute positioning (in CSS, top: 10px puts it 10 pixels from the top, and left: 10px puts it 10 pixels from the left) does it, but it's really hard to work with.
Modern website design is best done using CSS (cascading style sheets). However, you don't have to totally avoid tables. They are easy to learn and quick to set up. Simple table layouts for a web page are fine, as are lists and groups of data that need to be laid out in row/column format (like a spreadsheet). For more intense layouts, you'll definitely want to check out CSS though. The major drawback to using style sheets is that not all browsers support them in the same way. Sometimes your layouts will have variations across browsers and not all features work on all systems. The DIV tag is commonly used with CSS. (In addition, most other tags also support styles.)
I have to strongly disagree that frames are a good choice. I have seen very few websites use them properly as they are extremely difficult to work with. Mr. Stuff, your website looks nice, but I immediately saw that it was hard to link to a specific page. If I wanted to send someone a direct link to your Announcement page, for example, they would see this, which doesn't have any of the nice artwork or information that you put in the site's top or sidebars. Although frames have some uses, they are almost always inferior to other options.
Oh, I suppose I should go into using float a bit more. Let's say you want two columns, one for the sidebar and one for the main content. The proper method is to have two divs, one containing the whole navbar, the other containing the whole main. You can then label them with their jobs, and tell the main one to float right.
Bare bones of that code looks something like this:
And yes, this concept can be applied within those divs, and work on other tags (block tags, as they're called, like the p tag).
Oh, and let me (us) know if I'm above or below your understanding...
Private Mod Note
():
Rollback Post to RevisionRollBack
[The Crafters] | [Johnnies United]
My anecdotal evidence disagrees with yours! EXPLAIN THAT!
Frames are just outdated, I think. It seemed like a cool idea, but we've entered a level of sophistication where frames just get in our way. As necrogenesis pointed out, when you link someone to a page on a frames-based website, it'll either look bad, or they're forced to link to the index and give directions on how to arrive at what they're looking at. Not good. Another big problem that comes to mind is that a site with more than two frames, sometimes just the two frames, easily becomes a scrolling nightmare, so a person using a smaller screen than you designed for is compromised.
There are times when using frames is appropriate, but this isn't one of those times.
Private Mod Note
():
Rollback Post to RevisionRollBack
[The Crafters] | [Johnnies United]
My anecdotal evidence disagrees with yours! EXPLAIN THAT!
Okay, poor use of frames is bad then... but like use of Frames when considering smaller browsers or use of iframes can be acceptable in certian points?
Okay, poor use of frames is bad then... but like use of Frames when considering smaller browsers or use of iframes can be acceptable in certian points?
Responsible use of frames is fine, yes. Just know what you're doing, be aware of its drawbacks, and know the alternatives for when it's just not the time to use frames.
Private Mod Note
():
Rollback Post to RevisionRollBack
[The Crafters] | [Johnnies United]
My anecdotal evidence disagrees with yours! EXPLAIN THAT!
Gah, I cant find it now. Didnt someone suggest loading multiple websites on a single page?
Private Mod Note
():
Rollback Post to RevisionRollBack
"There are times when the word **** is justified, for example, you are on a crowded underground train, and the gent behind you is gently caressing your buttocks, somehow "Excuse me interrupting what for you is clearly a pleasurable experience but could I ask you politely to desist" does not carry the same urgency as "**** off you pervert." - Bill Connolly
Ok, so i was testing out the frames bit.. got some links going to random webpages (just for testing) but it loads that webpage in the sidebar... How do I make it load the main frame instead of loading the sidebar?
Private Mod Note
():
Rollback Post to RevisionRollBack
"There are times when the word **** is justified, for example, you are on a crowded underground train, and the gent behind you is gently caressing your buttocks, somehow "Excuse me interrupting what for you is clearly a pleasurable experience but could I ask you politely to desist" does not carry the same urgency as "**** off you pervert." - Bill Connolly
Each of your individual frames need to be named within the page where you have all the frameset tags. Take a look at Mr.Stuff's example he posted. Additionally within the HTML for the individual links in the sidebar frame you will have to add:
I want to put "boxes" or "tables" on my website and I have no idea how to do that. Tried looking it up, but got even more confused then I am now.
I also am curious on what type of code will allow me to situate things to the right of other things so I don't have a pure verticle website. Thanks for the help in advance.
An even better way to make your website more horizontal is to use frames. Frames basically split the screen up into different "websites", each of which loads its own html. For example, you might have a tall frame to one side which contains links (ie, a sidebar), and another in the middle which shows your main content. There are many options for frames - you can set them to have (or not have) borders, scrollbars, etc.
To give an example: I created this website with relatively basic html. Here's what the code that loads the main page looks like:
<html> <head> <title>WSU Anime Club</title> </head> <frameset rows="107,*" border="0"> <frame name="top" src="Banner.html" scrolling="no"> <frameset cols="280,*"> <frame name="sidebar" src="sidebar.html" scrolling="no"> <frame name="main1" src="homeframe.html"> </frameset> </frameset> </html>
Basically this code reads as:
Title
Create a row across the top with no border, 107px tall. With what's left:
Create a column on the left, no border, 280px wide. With what's left:
Create another frame (main content).
The "src" tells it what html page it should load in each frame. The "name" function is just for reference within the page (i.e. telling links which frame to open in), and up to you.
I just drew up a crude, simple sample of the div border approach; it can be found here. Also, I've always found www.wdvl.com (web developer's virtual library) to be useful.
Oh, and in CSS, the float attribute does the horizontal stuff - I used it in my sample as float: left - and display: inline can do it, too, if you're careful. Other than that, absolute positioning (in CSS, top: 10px puts it 10 pixels from the top, and left: 10px puts it 10 pixels from the left) does it, but it's really hard to work with.
General HTML site: http://www.idocs.com/tags/
Basic DIV tag info: http://www.idocs.com/tags/_DIV.html
TABLE tag info: http://www.idocs.com/tags/tables/_TABLE.html
I have to strongly disagree that frames are a good choice. I have seen very few websites use them properly as they are extremely difficult to work with. Mr. Stuff, your website looks nice, but I immediately saw that it was hard to link to a specific page. If I wanted to send someone a direct link to your Announcement page, for example, they would see this, which doesn't have any of the nice artwork or information that you put in the site's top or sidebars. Although frames have some uses, they are almost always inferior to other options.
Bare bones of that code looks something like this:
<html>
<head>
<style type="text/css">
#main { float: right; }
</style>
<body>
[content for the sidebar]
[rest of the site]
</html>
Oh, and you'd probably rather set up their widths to ensure the proper look, which looks more like this:
<style type="text/css">
#sidebar {
width: 20%;
}
#main {
width: 70%;
float: right;
}
</style>
And yes, this concept can be applied within those divs, and work on other tags (block tags, as they're called, like the p tag).
Oh, and let me (us) know if I'm above or below your understanding...
Frames are the devil.
Tables are for making tables, a la Excel. They're terrible for loading graphics into and the like.
LISTEN TO MAH SONGZ!
@BillyTheFridge
There are times when using frames is appropriate, but this isn't one of those times.
LISTEN TO MAH SONGZ!
@BillyTheFridge
target="main1"
here's an example:
Random Page
This tells the browser to load the linked page in the frame named "main1" instead of the default sidebar frame where the link resides.