A top bar on a website not floating properly on Chrome - html

I am creating a website and this is what it should look like:
http://i.imgur.com/PjsnVPw.png
^^ That is in Internet Explorer
But on Chrome it looks like this: http://i.imgur.com/Ga6le1y.png
As you can see the Top bar on chrome shows completely wrong
The HTML and CSS for this is
HTML
<header>
<img id="logo" src="images/logo.png" alt="Logo">
<div id="topLinks">
<div id="SoicalLinks">
<img src="images/LinkedIn.png" alt="Linkedin logo">
<img src="images/twitterico.png" alt="Twitter Logo">
</div>
<div id="PhoneNumber">
01673 862133
</div>
</div>
<nav>
<ul>
<li><a class="first" href="#">Coaching</a></li>
<li>NLP</li>
<li>Course</li>
<li>Culture Change</li>
<li>Training & Consultancy</li>
</ul>
</nav>
<div class="clear"></div>
<div id="banner">
<div id="face">
<img src="images/webface.png" alt="A side on view of a face">
</div>
<div id="fishwaterimage">
<img src="images/fishwater.png" alt="a Fish with a splash of water">
</div>
<div id="quote">
<p>"...The experience has been first class, I feel privileged to have had this opportunity. Thank you team Dexter."</p>
</div>
<div id="readmore">
<p>Read more testimonials...</p>
</div>
</div>
</header>
and the CSS for all that is
body {
background-image: url(/images/background.png); background-repeat: repeat-x;
margin: 0 auto 0 auto;
width: 1024px;
}
img #logo{
float: right;
width: 325px;
display: inline;
}
#topLinks{
margin: 0 0 0 50px;
width: 250px;
display: inline;
float: right;
}
#PhoneNumber{
padding: 15px;
color: #a7a2a5;
background-color: #000;
float: right;
}
#SoicalLinks{
float: left;
}
nav{
text-align: center;
float: right;
margin: -50px 0 0 0;
width: 600px;
}
nav ul
{
list-style-type:none;
margin:0;
padding:0;
}
nav a
{
font-size: 20px;
color: #383336;
text-decoration: none;
border-left: 1px solid #b22b8d;
display:block;
padding: 0px 10px 0 10px;
}
nav li
{
display: inline;
float: left;
}
nav ul a.first {
border-left: none;
}
#banner{
box-shadow: 1.5px 2.598px 15px 0px rgb( 0, 0, 0 );
width: 900px;
height: 248px;
margin: 0 auto 0 auto;
}
#banner #face{
float: left;
z-index: 2;
position: absolute;
}
#banner #fishwaterimage{
float: right;
margin: 0 0 0 0;
z-index: 1;
}
#banner #quote{
font-size: 26px;
float: left;
z-index: 3;
margin: 25px 0 0 25px;
color: #a7a2a5;
width: 300px;
position:absolute;
}
#banner #readmore{
font-size: 15px;
float: left;
z-index: 3;
margin: 170px 0 0 25px;
color: #a7a2a5;
width: 300px;
position:absolute;
font-style: italic;
}
Anyone with any idea why that is not showing properly in chrome and the fix.

Did you try adding position: absolute or position: relative to the nav bar?

Related

How to remove whitespace on a nav bar

Here's a screenshot of the issue I'm having:
I cannot for the life of me figure out how to remove the empty space on either side of the navbar. I've tried making the margin and padding 0 but it hasn't been working. Any help would be appreciated.
Here is the html:
html,
body {
margin: 0;
padding: 0;
height: 100%;
background-image: url("images/bg.jpg");
background-repeat: no-repeat;
background-position: center top;
font-family: Times New Roman;
}
header {
clear: both;
text-align: center;
}
#header img {
height: 40%;
width: 40%;
}
#wrap {
width: 1000px;
margin: auto;
padding: auto;
overflow: auto;
}
ul {
padding: 0;
}
nav ul {
margin: auto;
padding: auto;
list-style-type: none;
background-color: #009BB2;
}
nav li {
display: inline;
padding-left: 10px;
}
nav a {
text-decoration: none;
padding: 5px;
font-family: Times New Roman;
font-size: 25px;
color: maroon;
}
nav a:hover {
color: blue;
}
img.size {
height: 15%;
width: 15%;
padding: 5px;
}
section h1 {
text-align: center;
}
figure {
float: right;
overflow: hidden;
margin: 0px;
padding: 0px;
}
<div id="wrap">
<header>
<div id="header">
<img src="logo.png" alt="The Seasons" />
</div>
<nav>
<ul>
<li>Fall</li>
<li>Spring</li>
<li>Summer</li>
<li>Winter</li>
<li>Home</li>
</ul>
</nav>
</header>
<section>
<h1>The Four Seasons of the Earth</h1>
<figure class="fig">
<img class="size" src="images/fall_front.png" alt="Fall" />
</figure>
<figure class="fig">
<img class="size" src="images/winter_front.png" alt="Winter" />
</figure>
<figure class="fig">
<img class="size" src="images/spring_front.png" alt="Spring" />
</figure>
<figure class="fig">
<img class="size" src="images/summer_front.png" alt="Summer" />
</figure>
</section>
</div>
Add display: inline-block; to your nav ul selector and that will remove the whitespace from the sides.
html,
body {
margin: 0;
padding: 0;
height: 100%;
background-image: url("images/bg.jpg");
background-repeat: no-repeat;
background-position: center top;
font-family: Times New Roman;
}
header {
clear: both;
text-align: center;
}
#header img {
height: 40%;
width: 40%;
}
#wrap {
width: 1000px;
margin: auto;
padding: auto;
overflow: auto;
}
ul {
padding: 0;
}
nav ul {
margin: auto;
padding: auto;
list-style-type: none;
background-color: #009BB2;
display: inline-block;
}
nav li {
display: inline;
padding-left: 10px;
}
nav a {
text-decoration: none;
padding: 5px;
font-family: Times New Roman;
font-size: 25px;
color: maroon;
}
nav a:hover {
color: blue;
}
img.size {
height: 15%;
width: 15%;
padding: 5px;
}
section h1 {
text-align: center;
}
figure {
float: right;
overflow: hidden;
margin: 0px;
padding: 0px;
}
<div id="wrap">
<header>
<div id="header">
<img src="logo.png" alt="The Seasons" />
</div>
<nav>
<ul>
<li>Fall</li>
<li>Spring</li>
<li>Summer</li>
<li>Winter</li>
<li>Home</li>
</ul>
</nav>
</header>
<section>
<h1>The Four Seasons of the Earth</h1>
<figure class="fig">
<img class="size" src="images/fall_front.png" alt="Fall" />
</figure>
<figure class="fig">
<img class="size" src="images/winter_front.png" alt="Winter" />
</figure>
<figure class="fig">
<img class="size" src="images/spring_front.png" alt="Spring" />
</figure>
<figure class="fig">
<img class="size" src="images/summer_front.png" alt="Summer" />
</figure>
</section>
</div>
You're maxing out the width at 1000px:
#wrap{
width:1000px;
}
The nav is within that, so it can't stretch wider than that.
As is noted by others, you're setting the width to 1000px;
Change#wrap{width: 1000px} to #wrap{width: 100%}

Middle Div will not sit center of other divs

I am trying to create my header. Which includes a Logo (left), Banner (center) and NavBar (Right). I can get them level with each other but cannot get the banner to sit perfectly central of the page.
The banner is pushed over towards the right, sitting approximately 70% of the way across the screen.
Any ideas as to why this may be happening?
#header1 {
position: absolute;
width: 100%;
height: 100px;
text-align: center;
margin: 0px;
padding-top: 2px;
padding-right: 2px;
padding-left: 2px;
padding-bottom: 2px;
color: white;
font-size: 18px;
background-image: url(content/structure/fmabannerbehind.jpg);
background-position: center;
font-family: Constantia, "Lucida Bright", "DejaVu Serif", Georgia, serif;
font-style: italic;
}
#logo {
margin-left: 0px;
height: 100px;
width: 200px;
float: left;
border-color: red;
border-width: 3px;
border-style: solid;
}
#logo img {
height: 100px;
width: auto;
}
#banner {
position: absolute;
height: 100px;
width: auto;
display: inline-block;
margin: 0 auto;
border-color: red;
border-width: 3px;
border-style: solid;
}
#banner img {
height: 100px;
width: auto;
}
#menu1 {
margin-right: 0px;
height: 100px;
width: auto;
float: right;
border-color: red;
border-width: 3px;
border-style: solid;
}
<div id="header1">
<div id="logo">
<a href="http://www.fmarchived.com">
<img src="/content/structure/logo3.jpg" alt="logo">
</a>
</div>
<div id="banner">
<a href="/">
<img src="/content/structure/fmabanneronly.jpg" alt="banner">
</a>
</div>
<div id="menu1">
<div class="child2menu">
<ul>
<li>About Us
</li>
<li>Facebook
</li>
<li>Twitter
</li>
<li>Youtube
</li>
</ul>
</div>
</div>
</div>
UPDATE
Perhaps I should have explained better, I want the banner to be center
of the entire page, regardless of what the other divs are doing
Then add position:relative to #header1 and position:absolute + display: inline-table; position:absolute; left:0; right:0;
margin:auto; to #banner in both snippets
Option#1 - using CSS flexbox
Using justify-content: space-between from flexbox you can do this, and simplify a lot your code
* {
box-sizing: border-box;
margin: 0
}
#header1 {
display: flex;
justify-content: space-between;
position: relative
}
#header1 > div {
border: solid red
}
img {
vertical-align: bottom
}
#banner {
display: inline-table;
position: absolute;
left: 0;
right: 0;
margin: auto;
}
<div id="header1">
<div id="logo">
<a href="http://www.fmarchived.com">
<img src="//lorempixel.com/200/100" alt="logo">
</a>
</div>
<div id="banner">
<a href="/">
<img src="//lorempixel.com/100/100" alt="banner">
</a>
</div>
<div id="menu1">
<div class="child2menu">
<ul>
<li>About Us
</li>
<li>Facebook
</li>
<li>Twitter
</li>
<li>Youtube
</li>
</ul>
</div>
</div>
</div>
Option#2 - using your current code
Change position:absolute from #header1 to relative to remove scrollbars
* {
box-sizing: border-box;
margin: 0
}
#header1 {
position: relative;
width: 100%;
height: 100px;
text-align: center;
margin: 0;
padding: 2px;
color: white;
font-size: 18px;
background-image: url(content/structure/fmabannerbehind.jpg);
background-position: center;
font-family: Constantia, "Lucida Bright", "DejaVu Serif", Georgia, serif;
font-style: italic;
}
#header1 > div {
border: 3px solid red
}
img {
height: 100px;
width: auto;
vertical-align:bottom
}
#logo {
margin-left: 0;
width: 200px;
float: left;
}
#banner {
width: auto;
display: inline-table;
position:absolute;
left:0;
right:0;
margin:auto;
}
#menu1 {
margin-right: 0px;
float: right;
}
<div id="header1">
<div id="logo">
<a href="http://www.fmarchived.com">
<img src="//lorempixel.com/100/100" alt="logo">
</a>
</div>
<div id="banner">
<a href="/">
<img src="//lorempixel.com/100/100" alt="banner">
</a>
</div>
<div id="menu1">
<div class="child2menu">
<ul>
<li>About Us
</li>
<li>Facebook
</li>
<li>Twitter
</li>
<li>Youtube
</li>
</ul>
</div>
</div>
</div>
Remove the position: absolute property from the #banner div. If the #banner div needs to be absolutely positioned for some reason, you can center it by giving it a width and appropriateleft attribute instead.
Just remove the position absolute and it will align to the center.
#banner {
/*position:absolute;*/
height: 100px;
width: auto;
display: inline-block;
margin:0 auto;
border-color: red;
border-width: 3px;
border-style: solid;
}
you can use coordonates and margin: auto; to center your boxe if tou use absolute . but you need to reset display .
#banner {
position: absolute;
height: 100px;
width: auto;
display: table;/* shrinks on content */
left:0;
right:0;
margin: 0 auto;/* will center in between coordonates if boxe smaller */
border-color: red;
border-width: 3px;
border-style: solid;
}
run code snippet bellow:
#header1 {
position: absolute;
width: 100%;
height: 100px;
text-align: center;
margin: 0px;
padding-top: 2px;
padding-right: 2px;
padding-left: 2px;
padding-bottom: 2px;
color: white;
font-size: 18px;
background-image: url(content/structure/fmabannerbehind.jpg);
background-position: center;
font-family: Constantia, "Lucida Bright", "DejaVu Serif", Georgia, serif;
font-style: italic;
background:linear-gradient(to right,gray 50%, lightgray 50%);
}
#logo {
margin-left: 0px;
height: 100px;
width: 200px;
float: left;
border-color: red;
border-width: 3px;
border-style: solid;
}
#logo img {
height: 100px;
width: auto;
}
#banner {
position: absolute;
height: 100px;
width: auto;
display: table;
margin: 0 auto;
left:0;
right:0;
border-color: red;
border-width: 3px;
border-style: solid;
}
#banner img {
height: 100px;
width: auto;
}
#menu1 {
margin-right: 0px;
height: 100px;
width: auto;
float: right;
border-color: red;
border-width: 3px;
border-style: solid;
}
<div id="header1">
<div id="logo">
<a href="http://www.fmarchived.com">
<img src="/content/structure/logo3.jpg" alt="logo">
</a>
</div>
<div id="banner">
<a href="/">
<img src="/content/structure/fmabanneronly.jpg" alt="banner">
</a>
</div>
<div id="menu1">
<div class="child2menu">
<ul>
<li>About Us
</li>
<li>Facebook
</li>
<li>Twitter
</li>
<li>Youtube
</li>
</ul>
</div>
</div>
</div>

Float does not display

I face the problem that when I put float to my #middle-content. The float doesn't display. Moreover, this removes its background too. I want the middle-content to be at the right of #leftcontent. Help please!!
<body>
<div id="page">
<div id="banner">
<div id="cloud">
<img src="file:///C|/Users/admin/Desktop/DW CS3 Mr.Davis/Final/Cloud4.gif" width="573" height="121" /> </div>
<!--cloud-->
<div id="home">
<h2>HOME</h2>
</div>
<!--home-->
</div> <!--banner-->
<div id="maincontent">
<div id="leftcontent">
<div class="navigation">
Home
</div><!--navigation-->
<div class="navigation">
About Us
</div><!--navigation-->
<div class="navigation">
Products
</div><!--navigation-->
<div class="navigation">
Contact
</div><!--navigation-->
<div class="navigation">
ABOUT US
</div><!--navigation-->
</div> <!--leftcontent-->
<div id="middle-content">
<h1>Welcome To Bagger</h1>
</div> <!--middle-content-->
</div> <!--maincontent-->
</div> <!--page-->
</body>
And this is my CSS
#cloud {
float: left;
padding: 0px;
margin: 0px;
}
#page {
width: 800px;
margin-right: auto;
margin-left: auto;
}
#home {
float: left;
padding-left: 59px;
padding-right: 59px;
text-align:center;
left: auto;
top: auto;
right: auto;
bottom: auto;
padding-top: 37px;
padding-bottom: 37px;
}
#banner {
background-color: #78c8f0;
height: 130px;
}
.navigation {
font-family: Arial, Helvetica, sans-serif;
font-size: 18px;
text-decoration: none;
padding: 10px;
font-weight: bold;
text-align: center;
}
.navigation a {
text-decoration: none;
color: #000000;
background-position: center;
}
#maincontent {
background-color: #A6D2FF;
}
#leftcontent {
width: 150px;
display: table;
}
#middle-content {
width: 400px;
float: left;
}
You need to float the #leftcontent, and to fix the background, add a clear fix
#cloud {
float: left;
padding: 0px;
margin: 0px;
}
#page {
width: 800px;
margin-right: auto;
margin-left: auto;
}
#home {
float: left;
padding-left: 59px;
padding-right: 59px;
text-align: center;
left: auto;
top: auto;
right: auto;
bottom: auto;
padding-top: 37px;
padding-bottom: 37px;
}
#banner {
background-color: #78c8f0;
height: 130px;
}
.navigation {
font-family: Arial, Helvetica, sans-serif;
font-size: 18px;
text-decoration: none;
padding: 10px;
font-weight: bold;
text-align: center;
}
.navigation a {
text-decoration: none;
color: #000000;
background-position: center;
}
#maincontent {
background-color: #A6D2FF;
}
.clear:after {
content: '';
display: block;
clear: left;
height: 0;
}
#leftcontent {
width: 150px;
display: table;
float: left;
}
#middle-content {
padding-top: 1px;
width: 400px;
float: left;
}
<div id="page">
<div id="banner" class="clear">
<div id="cloud">
<img src="file:///C|/Users/admin/Desktop/DW CS3 Mr.Davis/Final/Cloud4.gif" width="573" height="121" />
</div>
<!--cloud-->
<div id="home">
<h2>HOME</h2>
</div>
<!--home-->
</div>
<!--banner-->
<div id="maincontent" class="clear">
<div id="leftcontent">
<div class="navigation">
Home
</div>
<!--navigation-->
<div class="navigation">
About Us
</div>
<!--navigation-->
<div class="navigation">
Products
</div>
<!--navigation-->
<div class="navigation">
Contact
</div>
<!--navigation-->
<div class="navigation">
ABOUT US
</div>
<!--navigation-->
</div>
<!--leftcontent-->
<div id="middle-content">
<h1>Welcome To Bagger</h1>
</div>
<!--middle-content-->
</div>
<!--maincontent-->
</div>
<!--page-->
I have also added 1px top padding to middle-content to stop the h2 margin causing a gap above maincontent
Update
Sounds like your dreamweaver does not support pseudo elements, see if this fixes your clear problem:
change css .clear:after to:
.clear {
display:block;
height:0;
overflow:hidden;
clear:both;
}
and then in the html above, find the divs with the clear class and remove the class, then at the end of those divs, add a physical div to see if it fixes your problem:
<div class="clear"></div>
try this
#leftcontent {
width: 150px;
float:left;
}
#middle-content {
width: 400px;
float: left;
}
also I have added
#maincontent:before,
#maincontent:after{
clear:both;
display:table;
content:"";
}
to fix the background color
working code is here
For your problems, i have the following solutions:
#maincontent can't show its background because its height is 0. You can fix it :
#maincontent {
background-color: #A6D2FF;
height:250px;
}
#leftcontent must have float:left so the middle-content to be at the right of #leftcontent
#leftcontent {
width: 150px;
display: table;
float: left;
}

HTML & CSS - Table attribute in CSS is behaving usual. Don't know how to fix it

I'm working on a webpage and decided to tables in CSS to create my navigation bar; all is fine until I go to the cell with email address. The cell sort of skips a column. My webpage code is below, please help.
HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="template.css">
<script type="text/javascript" src="action.js"></script>
<title>Danny Wong: Portfolio</title>
</head>
<body onload="cycleImage('latestImage');">
<div id="header">
<div id="navTableContainer">
<div class="navTableRow">
<div class="navContent">
<p class="paraLogo">Danny Wong Art</p>
</div>
</div>
<div class="navTableRow">
<div class="navContent">
Architectural Visualisation
</div>
</div>
<div class="navTableRow">
<div class="navContent">
Envirnoment
</div>
</div>
<div class="navTableRow">
<div class="navContent">
Design
</div>
</div>
<div class="navTableRow">
<div class="navContent">
Character
</div>
</div>
<div class="navTableRow">
<div class="navContent">
Digital Painting
</div>
</div>
<div class="navTableRow">
<div class="navContent">
Development
</div>
</div>
<div class="navTableRow">
<div class="navContent">
Resume
</div>
</div>
<div class="navTableRow">
<div class="navContent">
<a href="http://dintheart.tumblr.com/">Blog<a/>
</div>
</div>
<div class="navTableRow">
<div class="navContent">
test219#gmail.com
</div>
</div>
</div>
</div>
<div id="main">
<img id="latestImage" src="" alt="image cycler" width="1000" height="600">
</div>
<div id="footer">
© 2014 Danny Wong
</div>
</body>
</html>
CSS:
#import url(http://fonts.googleapis.com/css?family=Freckle+Face);
body {
background-color: #000000;
color: #FFFFFF;
}
#header {
float: left;
background-color: tranparent;
width: auto;
height: auto;
margin: 0 0 0 0;
padding: 0 0 0 0;
border-width: 2px;
border: solid;
}
p.paraLogo {
font-family: "freckle face", serif;
font-size: 36px;
font-style: bold;
}
#navTableContainer {
display: table;
background-color: tranparent;
width: auto;
height: auto;
margin: 0 0 0 0;
padding: 0 0 0 0;
border-width: 2px;
border: dotted;
}
#navTableContainer a:hover {
color: red;
}
div.navTableRow {
display: table-row;
width: auto;
height: auto;
margin: 0 0 0 0;
padding: 0 0 0 0;
}
div.navContent {
display: table-cell;
background-color: transparent;
width: auto;
height: auto;
margin: 0 0 0 0;
padding: 0 0 0 0;
border: solid;
border-width: 2px;
text-align: center;
vertical-align: middle;
}
#main {
background-color: transparent;
width: 1000px;
height: 600px;
margin: -1% auto 0 auto;
padding: 0 0 0 0;
border-width: 0;
}
#footer {
background-color: transparent;
width: 200px;
margin: 0 auto 0 auto;
border-width: 0;
}
a:visited {
color: #FFFFFF;
text-decoration: none;
}
a:link {
color: #FFFFFF;
text-decoration: underline;
}
Its really getting on my nerves, I know there are other better way and will probably use them, but I really want to find out why this is happening and it could be fixed - for future reference.
Here's how I'd do it:
HTML
<div id="header">
<ul>
<li class="paraLogo">Danny Wong Art</li>
<li>Architectural Visualisation</li>
<li>Envirnoment</li>
<li>Design
</li>
<li>Character
</li>
<li>Digital Painting</li>
<li>Development</li>
<li>Resume</li>
<li>Blog
</li>
<li> test219zgmail.com
</li>
</ul>
</div>
<div id="main">
<img id="latestImage" src="" alt="image cycler" width="1000" height="600" />
</div>
<div id="footer">© 2014 Danny Wong</div>
CSS
#import url(http://fonts.googleapis.com/css?family=Freckle+Face);
body {
background-color: #000000;
color: #FFFFFF;
}
#header {
float: left;
background-color: tranparent;
width: auto;
height: auto;
margin: 0 0 0 0;
padding: 0 0 0 0;
border-width: 2px;
border: solid;
}
#header li.paraLogo {
font-family:"freckle face", serif;
font-size: 36px;
font-style: bold;
padding: 1em 0;
}
#header ul {
background-color: tranparent;
list-style:none;
width: auto;
height: auto;
margin: 0 0 0 0;
padding: 0 0 0 0;
border-width: 2px;
border: dotted;
}
#header ul a:hover {
color: red;
}
#header li {
background-color: transparent;
width: auto;
height: auto;
margin: 0 0 0 0;
padding: 0 0 0 0;
border: solid;
border-width: 2px;
text-align: center;
vertical-align: middle;
}
#main {
background-color: transparent;
width: 1000px;
height: 600px;
margin: -1% auto 0 auto;
padding: 0 0 0 0;
border-width: 0;
}
#footer {
background-color: transparent;
width: 200px;
margin: 0 auto 0 auto;
border-width: 0;
}
a:visited {
color: #FFFFFF;
text-decoration: none;
}
a:link {
color: #FFFFFF;
text-decoration: underline;
}
Example: http://jsfiddle.net/ht5zH/2/
I know my answer will not be a big help for you, and maybe I don't understand all your needs, but I highly reccommend you to design your menu another way than with display: table;. An UL list will be easier for the HTML and CSS code.

How do i make a link when clicked show a larger image on the page

Basically i want my see more button, when clicked to enlarge the image above it. So that the image appears in the middle of the page enlarged does anyone know of a way to do this, or a tutorial i could follow, would be much appreciated. by the way im fairly new to web design so a little help thanks!
Also the objects i want to change are under portfolio item
here is a link to the website:
http://www.mmicgt.com/michael_g/portfolio.html
HTML:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>{Michael Grace} Portfolio website - {Gracey design}</title>
<link href="css/gallery.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
<ul id="navigation">
<li><img src="images/images/home_button2.gif" onmouseover="this.src='images/images/home_button1.gif'" onmouseout="this.src='images/images/home_button2.gif'"/>
</li>
<li><img src="images/images/about_button1.gif" onmouseover="this.src='images/images/about_button2.gif'" onmouseout="this.src='images/images/about_button1.gif'"/>
</li>
<li>
<div id="logo" style="padding:16px">
<img src="images/images/logo.png" />
</div>
</li>
<li><img src="images/images/gallery_button1.gif" onmouseover="this.src='images/images/gallery_button2.gif'" onmouseout="this.src='images/images/gallery_button1.gif'"/>
</li>
<li><img src="images/images/contact_button1.gif" onmouseover="this.src='images/images/contact_button2.png'" onmouseout="this.src='images/images/contact_button1.gif'"/>
</li>
</ul>
<div id="header">
<h1><img src="images/images/gallery_03.png" /></h1>
<h2>Portfolio.</h2>
</div>
<div id="line">
</div>
<div id="content">
<p>Did I mention I design stuff? I've had plenty of fun creating a bunch of designs for both Univeristy and for myself as personal projects. Here's a collection of some of my favs.
</p>
<div class="portfolio-item">
<img src="images/home/image1.gif" alt="View more info" />
<p class="btn">SEE MORE</p>
</div>
<div class="portfolio-item">
<img src="images/home/image2.gif" alt="View more info" />
<p class="btn">SEE MORE</p>
</div>
<div class="portfolio-item">
<img src="images/home/image3.gif" alt="View more info" />
<p class="btn">SEE MORE</p>
</div>
<div class="portfolio-item">
<img src="images/home/image4.gif" alt="View more info" />
<p class="btn">SEE MORE</p>
</div>
<div class="portfolio-item">
<img src="images/home/image5.png" alt="View more info" />
<p class="btn">SEE MORE</p>
</div>
<div class="portfolio-item">
<img src="images/home/image6.png" alt="View more info" />
<p class="btn">SEE MORE</p>
</div>
<div class="portfolio-item">
<img src="images/home/image7.png" alt="View more info" />
<p class="btn">SEE MORE</p>
</div>
<div class="portfolio-item">
<img src="images/home/image8.gif" alt="View more info" />
<p class="btn">SEE MORE</p>
</div>
</div>
</div>
</div>
</body>
css:
body {
background: url(../images/images/bg_page.gif) center center;
font: 16px Helvetica, Arial, Sans-Serif;
color: #636363;
line-height: 24px;
}
#container {
width: 940px;
margin: 0 auto;
margin-top: 100px;
}
#header {
height: 177px;
background: url(../images/home/header.gif) top center;
padding: 52px 0 0 28px;
position: relative;
border-radius: 10px 10px 0px 0px;
}
#header h1 {
margin: 0px 0 20px 0;
}
#header h2 {
width: 510px;
font: 30px Helvetica, Arial, Sans-Serif;
color: #f2f0eb;
letter-spacing: 2px;
margin: 0 0 20px 0;
text-shadow: 0px 3px 3px #494949;
}
#logo {
width: 272px;
height: 214px;
position: absolute;
left: 49.5%;
top: 11%;
margin-left: -150px;
margin-top: -86px;
z-index: 2;
}
#navigation {
position: relative;
height: 60px;
}
#navigation li {
display: inline;
width: 160px;
height: 60px;
float: left;
padding: 13px 0 0 16px;
}
#navigation li:nth-child(1) {
margin: 0 0 0 -57px;
}
#navigation li:nth-child(2) {
margin: 0 0 0 0;
}
#navigation li:nth-child(3) {
margin: 0 0 0 0;
}
#navigation li:nth-child(4) {
margin: 0 0 0 77px;
}
#content {
height: 592px;
background: url(../images/home/bg_body.png) top center;
padding: 41px 69px 50px 28px;
overflow: hidden;
position: relative;
border-radius: 0px 0px 10px 10px;
}
#content h2 {
font: 30px Helvetica, Arial, Sans-Serif;
letter-spacing: 2px;
margin: 0 0 20px 0;
}
#content h3 {
font: 26px Helvetica, Arial, Sans-Serif;
letter-spacing: 2px;
margin: 0 0 20px 0;
}
#content p {
margin: 0 0 30px 0;
}
#content a {
color: #671111;
text-decoration: none;
}
#content a:hover {
color: #a12121;
}
#content .portfolio-item {
width: 190px;
padding: 1px;
background: #eee;
text-align: center;
float: left;
margin: 0 7px 14px 7px;
}
#content .portfolio-item p.btn {
margin: 0;
}
#content .portfolio-item p.btn a {
display: block;
width: 183px;
height: 29px;
padding: 7px 0 0 0;
background: url(images/images/background-seemore_03.gif);
font-weight: bold;
text-align: center;
text-transform: uppercase;
text-decoration: none;
}
#line {
height: 4px;
background: url(../images/home/line.gif) top center;
position: relative;
}
You should look for satisfying js lib for that. They are often easy-to-install and do not require any coding for basic usage. Here're some popular examples:
LightBox - Very popular lib
FancyBox - I used it for most of my projects, it's lightweight and really fancy
Theese libs support HTML content to show up, so you can add any content to youy pictures. They are recommended, because they are developed for a long time and stable enough. Good luck!
EDIT:
<!-- Usage example -->
See more
Link can have any inline content - image, text, etc.