Click to See Complete Forum and Search --> : An issue that should be simple


some noob
12-29-2009, 11:26 PM
Hey guys and gals as my name suggests i am a total noob. I am working on a site and i cant figure out how to get text to stay to the sides of the window.
For instance i want my internal links on the left of the screen and the external ones on the right. I am pretty sure that i need to use a table to do it but as i said im a noob so yeah thanks for any help.

monkee98
12-30-2009, 04:55 AM
Well you have to options yove got divs which needs css and html or just tables which is only html and im only going to say the tables option

<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" valign="top" align="center" colspan="3">
Insert title here
</td>
</tr>
<tr>
<td width="150" valign="top" align="left">Insert stuff here LEFT SIDE</td>
<td width="*" valign="top" align="center">Insert stuff here CENTER</td>
<td width="150" valign="top" align="right">Insert stuff here RIGHT SIDE</td>
</tr>
</table>


If you do not want the title just remove that entire tr tag and valign is vertical alignment and align is where the text should be not the box

some noob
12-30-2009, 03:24 PM
cool thanks

Samwho?
12-31-2009, 12:56 PM
I would personally go with the divs options. Create 3 divs, one for your internal links, one for your external links and one for your central content. Use CSS and give the div that goes on the left a "float: left;" and the div that goes on the right a "float: right;". Should work and is better than using tables :)

some noob
01-02-2010, 01:26 PM
ill check it out
i'm not getting the results I wanted with tables after 2 hours of number play so thanks for the tip.

WestWeb
01-02-2010, 04:39 PM
Here is a basic 3 column layout with css and html. Unlike the table method you've been shown: which, is full of deprecated html attributes, the following code should validate so there is a more likely chance your website can be viewed properly in a range of browsers. Also you should always try to keep your website content(HTML) separated from the positioning and styling(CSS) of the content in your website; using tables for layout does not achieve this goal.


The HTML file:
index.html

<html>
<head>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>

<div id="container">

<div id="internal">
Internal Links Here:
<ul>
<li><a href="iLink1">internal link 1</a></li>
<li><a href="iLink2">internal link 2</a></li>
<li><a href="iLink3">internal link 3</a></li>
<li><a href="iLink4">internal link 4</a></li>
<li><a href="iLink5">internal link 5</a></li>
</ul>
</div>

<div id="external">
External Links Here"
<ul>
<li><a href="eLink1">external link 1</a></li>
<li><a href="eLink2">external link 2</a></li>
<li><a href="eLink3">external link 3</a></li>
<li><a href="eLink4">external link 4</a></li>
<li><a href="eLink5">external link 5</a></li>
</ul>
</div>

<div id="content">
This content has to be longer than the two side columns This content has to be longer than the two side columns This content has to be longer than the two side columns This content has to be longer than the two side columns This content has to be longer than the two side columns This content has to be longer than the two side columns This content has to be longer than the two side columns This content has to be longer than the two side columns This content has to be longer than the two side columns This content has to be longer than the two side columns This content has to be longer than the two side columns This content has to be longer than the two side columns This content has to be longer than the two side columns This content has to be longer than the two side columns This content has to be longer than the two side columns
</div>

</div>

</body>
</html>


The CSS style sheet file:
styles.css

#container {
width: 1024px;
margin: 0px auto;
border: solid #00f 1px;
}

#internal {
width: 200px;
float: left;
border: solid #0f0 1px;
display: block;
}

#content {
margin: 0px 200px 0px 200px;
border: solid #0f0 1px;
}

ul {
list-style-position: inside;
list-style-type: none;
}

#external {
width: 200px;
float: right;
border: solid #0f0 1px;
}

Letmein
01-02-2010, 04:46 PM
I dont know if this answer will be popular with experts here, however I would recommend to a beginner using an application at first like Dreamweaver of even Frontpage... Dreamweaver is better...

I dont say this to be rude or anything but because I think its a good way to learn, if you can make something decent using apps like these, if you learn the basics like tables, divs, etc then you can still look at the code and see how things work... Its horrible when your just learning taking 2 hours playing with numbers just to get things to line up, etc :) when you use apps like that and manage to work with the basics then you will find looking at the code a lot simpler :)

Anyway just my opinion :)