-5

Ive already tried a few stuff and nothing seems to work! I tried looking at other posts but didnt find anything. I want to center my name, and the links! as well as the middle portion.

Also wanted to but a border at the top, kinda like facebook has but didnt find anything online.

Heres the link to the website http://electron.cs.uwindsor.ca/~rammal1/

<!DOCTYPE html>
<html>
<head>
<title>Hassen Rammal </title>

</head>
    <h1 style="color: red"><center> Hassen Rammal  </h1>
<body>
<body bgcolor="#A9A9A9">

<h3 align="center"> Welcome to my online porfolio. </h3>

<div id="table" style="width:80%;margin-left:auto;margin-right:auto;">

<table height="230px" background="GOT.jpg">
    <tr>
        <td colspan="3"></td>
        <td colspan="3" style="font-size: 4em; font-weight: bold" valign="bottom" ><center>Hassen Rammal</td>
    </tr>
    <tr>
        <td colspan="2"></td>
        <td colspan="4" style="font-size: 1.3em; font-weight: bold;" valign="top">All the stuff you need to know me</td>
    </tr>
    <tr><ul >
        <th width="900px"></td>
        <th width="70px"><a href = "AboutMe.html"><ul>About Me</ul></a></td>
        <th width="120px"><a href = "Education.html"><ul>Education</ul></a></td>
        <th width="120px"><a href = "Experience.html"><ul>Work Experience</ul></a></td>
        <th width="80px"><a href=" ThingsILike.html">Things I Like</a></td>
   </u> </tr>
</table>








<p>  </p>
</body>
</html>

Thank you for the help.

  • so many ways, possible duplicate: https://stackoverflow.com/questions/114543/how-to-horizontally-center-a-div-in-another-div – Niles Tanner Oct 26 '17 at 03:01
  • Please re-think your website layout. Tables aren't meant for layout purposes anymore for websites this isn't the 90's please reconsider HTML5 standards by using `div` tags or `sections` and `articles` instead. – Jorden Oct 26 '17 at 03:04
  • Ill be happy to reconsider! I found this table layout on a website and it seemed pretty simple to me. But if there's an easier way to do this which is more efficient ill gladly do it! @admcfajn – Hassan Rammal Oct 26 '17 at 03:06
  • Sorry, i just deleted my comment @HassanRammal as someone else said nearly the same thing a couple second before me, just one second – admcfajn Oct 26 '17 at 03:06
  • @Jorden1337 Will do! thank you! never knew table is now out-dated! – Hassan Rammal Oct 26 '17 at 03:06
  • @admcfajn No problem! Sure, any help would be great! Thank you – Hassan Rammal Oct 26 '17 at 03:07
  • Have a look here: https://foundation.zurb.com/sites/download.html/essential There are also many other great frameworks to use. twitter bootstrap, google material... But just give the code in that download a view and have a look at this here too: https://foundation.zurb.com/sites/docs/grid.html Make plenty of backups of the site as you go, just copy/paste the whole folder before you do anything that's outside your comfort zone. Welcome to web-development. – admcfajn Oct 26 '17 at 03:10
  • 1
    @admcfajn Must appreciated! Thanks a lot! – Hassan Rammal Oct 26 '17 at 03:11
  • @HassanRammal happy to help :) – admcfajn Oct 26 '17 at 03:12
  • There are a number of elements and attributes you are using that are obsolete, such as `
    ` and `bgcolor` and `valign`. Your HTML is also invalid.
    – Rob Oct 26 '17 at 03:15

1 Answers1

1

you must edit your html code like this:

body {
    background-color: #A9A9A9;
}

#table, table {
    margin: 0 auto;
}

h1, h3 {
    text-align: center;
}
<h1 style="color: red">Hassen Rammal</h1>

<h3> Welcome to my online porfolio. </h3>

<div id="table" style="width:80%">

<table height="230px" background="GOT.jpg">
    <tr>
        <td colspan="5" style="font-size: 4em; font-weight: bold;text-align: center" valign="bottom">Hassen Rammal</td>
    </tr>
    <tr>
        <td colspan="5" style="font-size: 1.3em; font-weight: bold;text-align: center" valign="top">All the stuff you need to know me</td>
    </tr>
    <tr>
        <th width="200px"><a href = "AboutMe.html">About Me</a></th>
        <th width="200px"><a href = "Education.html">Education</a></th>
        <th width="200px"><a href = "Experience.html">Work Experience</a></th>
        <th width="200px"><a href=" ThingsILike.html">Things I Like</a></th>
    </tr>
</table>
<p></p>
Ehsan
  • 12,655
  • 3
  • 25
  • 44