d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Need Quick Help!! Html5 And Css
Add Reply New Topic New Poll
Member
Posts: 3,429
Joined: Jan 19 2006
Gold: 1,838.79
Dec 10 2014 09:08pm
I'm doing a basic course on html5 inc CSS and i am stuck on one simple thing i cannot seem to vertically align and center then space words in a Nav Column
Member
Posts: 3,429
Joined: Jan 19 2006
Gold: 1,838.79
Dec 10 2014 09:21pm
Quote (obitwice @ Dec 11 2014 12:38pm)
I'm doing a basic course on html5 inc CSS and i am stuck on one simple thing i cannot seem to vertically align and center then space words in a Nav Column
http://i58.tinypic.com/2s64k10.jpg


so far i have this

With this code!
HTML: <nav><a href="ex4.1html"><span>Exercise4.1</span></a>
<a href="ex4.2html"><span>Exercise4.2</span></a>
<a href="ex4.3html"><span>Exercise4.3</span></a></nav>
<section><img src="../images/Basketball.jpg" alt = "Your Basketball Picture Didn't Load!"/> </section>

CSS:nav{ text-align: center;
padding: 1em 0;
width: 100%;
word-spacing: 5em;
background-color:#FFFF00;
position:absolute;top:200px;left:824px;width:200px; height:768px;}
Member
Posts: 62,873
Joined: Aug 2 2009
Gold: 1,189.90
Dec 11 2014 12:26am
Code
nav a {
margin-bottom: 1em;
display: block;
}


Add this style to your css and adjust the margin-bottom value to your liking.
Member
Posts: 3,429
Joined: Jan 19 2006
Gold: 1,838.79
Dec 11 2014 01:25am
Quote (AnimeFTW @ Dec 11 2014 03:56pm)
Code
nav a {
  margin-bottom: 1em;
  display: block;
}


Add this style to your css and adjust the margin-bottom value to your liking.


Didn't work but managed to solve the problem by adding this code to my html
<header>I Like Basketball!</header>
<br/><br/>
<nav><a href="ex4.1html"><span>Exercise4.1</span></a>
<br/><br/>
<a href="ex4.2html"><span>Exercise4.2</span></a>
<br/><br/>
<a href="ex4.3html"><span>Exercise4.3</span></a></nav>
the double <br/> helped make the spaces i needed.
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll