School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,574 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,199 people online right now. Registration is fast and FREE... Join Now!




Aligning my menu to the left.

 

Aligning my menu to the left., MEGA Newbie question.

papuccino1

16 Jun, 2009 - 06:23 PM
Post #1

C# Programmer
Group Icon

Joined: 2 Mar, 2008
Posts: 943



Thanked: 33 times
Dream Kudos: 50
My Contributions
Hi there, I've downloaded Amaya tonight and I want to build my own portfolio site.

How would I go about positioning my Menu so it's always on the left of the page?

Here's the HTML:

html
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>HomeSite</title>
<meta name="generator" content="Amaya, see http://www.w3.org/Amaya/" />
</head>

<body style="background-color:#91A84F">

<div class=Menu>
<table border="1" bgcolor="#D9FFA9" style="width: 12%">

<caption></caption>
<col />
<tbody>
<tr>
<td>Home</td>
</tr>
<tr>
<td>Portfolio</td>

</tr>
<tr>
<td>In Development</td>
</tr>
<tr>
<td>Contact</td>
</tr>
<tr>

<td>About</td>
</tr>
</tbody>
</table>
</div>

</body>
</html>


Remember, I'm a COMPLETE newbie when it comes to layouts in HTML. I may not <p>, <br>, etc. But I don't know how to apply them

User is offlineProfile CardPM
+Quote Post


BetaWar

RE: Aligning My Menu To The Left.

16 Jun, 2009 - 07:08 PM
Post #2

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 4,729



Thanked: 269 times
Dream Kudos: 1400
My Contributions
Try using this CSS:

CODE

<style>
.Menu{
  float: left;
}
</style>


Then put all your content like so:
CODE

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
  <title>HomeSite</title>
  <meta name="generator" content="Amaya, see http://www.w3.org/Amaya/" />
</head>

<body style="background-color:#91A84F">

<div class=Menu>
<table border="1" bgcolor="#D9FFA9" style="width: 12%">

  <caption></caption>
  <col />
  <tbody>
    <tr>
      <td>Home</td>
    </tr>
    <tr>
      <td>Portfolio</td>

    </tr>
    <tr>
      <td>In Development</td>
    </tr>
    <tr>
      <td>Contact</td>
    </tr>
    <tr>

      <td>About</td>
    </tr>
  </tbody>
</table>
</div>
Content goes here.
</body>
</html>



Hope that helps.
User is offlineProfile CardPM
+Quote Post

papuccino1

RE: Aligning My Menu To The Left.

17 Jun, 2009 - 09:36 AM
Post #3

C# Programmer
Group Icon

Joined: 2 Mar, 2008
Posts: 943



Thanked: 33 times
Dream Kudos: 50
My Contributions
Thanks for your help Beta, however I'm so new at this I have no idea what to do with that code.

How do I create a .css file? Does it need to be in the same folder as the .html file?

The code your wrote for the .css, does the .css file need to have JUST that code in order to work, or is there a <head><body> sort of thing in .css I'm not aware of?

Can I write the .css in Notepad and then change the extension?
User is offlineProfile CardPM
+Quote Post

Toxicterror

RE: Aligning My Menu To The Left.

17 Jun, 2009 - 10:40 AM
Post #4

You have [int.MAX] new eMails
****

Joined: 10 Mar, 2009
Posts: 625



Thanked: 14 times
My Contributions
BetaWars Code is all one file i suppose

just add that CSS part inside the <head></head> and it works

save then the whole file as a normal .html file


//edit:
and yes you can do everything in that shitty notepad biggrin.gif

This post has been edited by Toxicterror: 17 Jun, 2009 - 10:40 AM
User is offlineProfile CardPM
+Quote Post

papuccino1

RE: Aligning My Menu To The Left.

17 Jun, 2009 - 05:02 PM
Post #5

C# Programmer
Group Icon

Joined: 2 Mar, 2008
Posts: 943



Thanked: 33 times
Dream Kudos: 50
My Contributions
Thank you both, it works how I wanted it to. Damn, this is HTML looks hard to learn (probably because of the alien syntax) but it looks really structured which I like. (I have somewhat OCD)
User is offlineProfile CardPM
+Quote Post

Toxicterror

RE: Aligning My Menu To The Left.

18 Jun, 2009 - 09:27 AM
Post #6

You have [int.MAX] new eMails
****

Joined: 10 Mar, 2009
Posts: 625



Thanked: 14 times
My Contributions
belive me html is quiet easy biggrin.gif
its more dificult the get it looking well with that "wow" effect wink2.gif
it becomes harder with php, not even starting to talk about asp/jsp
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/8/09 08:15AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month