css - My <a href> won't work -


this first class in web developing , can't <a href> links separate chapters work. below code:

    <!doctype html> <html lang="en"> <head>     <meta charset="utf-8">     <title>alice's adventure in wonderland</title>     <img src="alice_1" alt="" >       <link rel="stylesheet" href="main1.css"> </head>      <body>     <div id="container">         <section id="header">             <img src="alice_1.jpg" alt="alice_1" height="100">             <h2>alice's adventures in wonderland</h2>             <h1>lewis carroll</h1>         </section>         <nav id="nav_bar">             <ul>             <li><a href="index1.html" ></a>chapter i</li>             <li><a href="index2.html"></a>chapter ii</li>             <li><a href="index3.html"></a>chapter iii</li>               </ul>         </nav>         <div id="main">             <h1>ch i. down rabbit-hole</h1>             <p>alice beginning tired of sitting sister on bank, , of having nothing do: once or twice had peeped book sister reading, had no pictures or conversations in it, 'and use of book,' thought alice 'without pictures or conversations?'</p>              <p>so considering in own mind (as could, hot day made feel sleepy , stupid), whether pleasure of making daisy-chain worth trouble of getting , picking daisies, when white rabbit pink eyes ran close her.</p>             <span>             <img src="alice_1_3.png" alt="">             </span>              <p>there nothing remarkable in that; nor did alice think out of way hear rabbit itself, 'oh dear! oh dear! shall late!' (when thought on afterwards, occurred ought have wondered @ this, @ time seemed quite natural); when rabbit took watch out of waistcoat-pocket, , looked @ it, , hurried on, alice started feet, flashed across mind had never before seen rabbit either waistcoat-pocket, or watch take out of it, , burning curiosity, ran across field after it, , fortunately in time see pop down large rabbit-hole under hedge.</p>              <p>in moment down went alice after it, never once considering how in world out again.             rabbit-hole went straight on tunnel way, , dipped down, alice had not moment think stopping herself before found herself falling down deep well.</p>              <p>either deep, or fell slowly, had plenty of time went down , wonder going happen next. </p>              <p>first, tried down , make out coming to, dark see anything; looked @ sides of well, , noticed filled cupboards , book-shelves; here , there saw maps , pictures hung upon pegs.</p>               <p>she took down jar 1 of shelves passed; labelled 'orange marmalade', great disappointment empty: did not drop jar fear of killing somebody, managed put 1 of cupboards fell past it.</p>              <p>'well!' thought alice herself, 'after such fall this, shall think nothing of tumbling down stairs! how brave they'll think me @ home! why, wouldn't it, if fell off top of house!' (which true.)</p>              <p>down, down, down. fall never come end! 'i wonder how many miles i've fallen time?' said aloud. 'i must getting somewhere near centre of earth. let me see: 4 thousand miles down, think—' (for, see, alice had learnt several things of sort in lessons in schoolroom, , though not opportunity showing off knowledge, there no 1 listen her, still practice over) '—yes, that's right distance—but wonder latitude or longitude i've got to?' (alice had no idea latitude was, or longitude either, thought nice grand words say.)</p>              <p>presently began again. 'i wonder if shall fall right through earth! how funny it'll seem come out among people walk heads downward! antipathies, think—' (she rather glad there no 1 listening, time, didn't sound @ right word) '—but shall have ask them name of country is, know. please, ma'am, new zealand or australia?' (and tried curtsey spoke—fancy curtseying you're falling through air! think manage it?) 'and ignorant little girl she'll think me asking! no, it'll never ask: perhaps shall see written somewhere.'</p>              <p>down, down, down. there nothing else do, alice began talking again. 'dinah'll miss me to-night, should think!' (dinah cat.) 'i hope they'll remember saucer of milk @ tea-time.</p>              <p>dinah dear! wish down here me! there no mice in air, i'm afraid, might catch bat, , that's mouse, know. cats eat bats, wonder?' , here alice began rather sleepy, , went on saying herself, in dreamy sort of way, 'do cats eat bats? cats eat bats?' , sometimes, 'do bats eat cats?' for, see, couldn't answer either question, didn't matter way put it. felt dozing off, , had begun dream walking hand in hand dinah, , saying earnestly, 'now, dinah, tell me truth: did ever eat bat?' when suddenly, thump! thump! down came upon heap of sticks , dry leaves, , fall over.</p>              <p>alice not bit hurt, , jumped on feet in moment: looked up, dark overhead; before long passage, , white rabbit still in sight, hurrying down it. there not moment lost: away went alice wind, , in time hear say, turned corner, 'oh ears , whiskers, how late it's getting!' close behind when turned corner, rabbit no longer seen: found herself in long, low hall, lit row of lamps hanging roof.</p>              <p>there doors round hall, locked; , when alice had been way down 1 side , other, trying every door, walked sadly down middle, wondering how ever out again.</p>              <p>suddenly came upon little three-legged table, made of solid glass; there nothing on except tiny golden key, , alice's first thought might belong 1 of doors of hall; but, alas! either locks large, or key small, @ rate not open of them. </p>              <p>however, on second time round, came upon low curtain had not noticed before, , behind little door fifteen inches high: tried little golden key in lock, , great delight fitted!</p>              <p>alice opened door , found led small passage, not larger rat-hole: knelt down , looked along passage loveliest garden ever saw. how longed out of dark hall, , wander among beds of bright flowers , cool fountains, not head through doorway; 'and if head go through,' thought poor alice, 'it of little use without shoulders. oh, how wish shut telescope! think could, if knew how begin.' for, see, many out-of-the-way things had happened lately, alice had begun think few things indeed impossible.</p>              <p>there seemed no use in waiting little door, went table, half hoping might find key on it, or @ rate book of rules shutting people telescopes: time found little bottle on it, ('which not here before,' said alice,) , round neck of bottle paper label, words 'drink me' beautifully printed on in large letters.</p>              <p>it 'drink me,' wise little alice not going in hurry. 'no, i'll first,' said, 'and see whether it's marked "poison" or not'; had read several nice little histories children had got burnt, , eaten wild beasts , other unpleasant things, because not remember simple rules friends had taught them: such as, red-hot poker burn if hold long; , if cut finger knife, bleeds; , had never forgotten that, if drink bottle marked 'poison,' disagree you, sooner or later.</p>              <p>however, bottle not marked 'poison,' alice ventured taste it, , finding nice, (it had, in fact, sort of mixed flavour of cherry-tart, custard, pine-apple, roast turkey, toffee, , hot buttered toast,) finished off.</p>             <p>'what curious feeling!' said alice; 'i must shutting telescope.'             , indeed: ten inches high, , face brightened @ thought right size going through little door lovely garden. first, however, waited few minutes see if going shrink further: felt little nervous this; 'for might end, know,' said alice herself, 'in going out altogether, candle. wonder should then?' , tried fancy flame of candle after candle blown out, not remember ever having seen such thing.</p>               <p>after while, finding nothing more happened, decided on going garden @ once; but, alas poor alice! when got door, found had forgotten little golden key, , when went table it, found not possibly reach it: see quite plainly through glass, , tried best climb 1 of legs of table, slippery; , when had tired herself out trying, poor little thing sat down , cried.</p>              <p>'come, there's no use in crying that!' said alice herself, rather sharply; 'i advise leave off minute!' gave herself advice, (though seldom followed it), , scolded herself severely bring tears eyes; , once remembered trying box own ears having cheated herself in game of croquet playing against herself, curious child fond of pretending 2 people. 'but it's no use now,' thought poor alice, 'to pretend 2 people! why, there's hardly enough of me left make 1 respectable person!'</p>              <p>soon eye fell on little glass box lying under table: opened it, , found in small cake, on words 'eat me' beautifully marked in currants. 'well, i'll eat it,' said alice, 'and if makes me grow larger, can reach key; , if makes me grow smaller, can creep under door; either way i'll garden, , don't care happens!'</p>              <p>she ate little bit, , said anxiously herself, 'which way? way?', holding hand on top of head feel way growing, , quite surprised find remained same size: sure, happens when 1 eats cake, alice had got way of expecting nothing out-of-the-way things happen, seemed quite dull , stupid life go on in common way.</p>             <p>so set work, , finished off cake...</p>         </div>         <div id="footer">             <p>warren littleton              <span id="text-align:center">project 1</span></p>         </div>     </div> </body>     </html>  

my .css code:

/*added #container body shrinkage*/  #container{     margin:0 auto;     width:70%;     height: 50%; } body {     width: auto; } span{     float: right;     display: inline; } /* styles header */ #header {     padding: 1em 1em 1em 1em;     background color: blueviolet; } #header h1{     font-size: 75%;     font-style: italic;     color: blueviolet;     text-align: right;     padding-right: 4em; } #header h2 {     font-size: 175%;     color: blueviolet;     font-family: cursive;     font-weight:500;      position: relative;     text-align: center;     padding-right: 4em; } #header img{     float:left;     display: inline;     padding-left:2em;  } /* navigation bar */ #nav_bar ul{     list-style:none;     text-align: center;     padding: 1em;     padding-bottom: 1em;     border-bottom: 3px solid blueviolet;     border-top: 3px solid blueviolet; } #nav_bar ul li{     display: inline;     padding:3em 5em;     font-weight: bold;     color:darkorchid;     font-size: 75%; }  #main{     float:left; } #main h1{     font-size: 100%;     font-family:cursive;     font-style: italic;     font-weight: 300;     color: darkviolet;  } #footer{     color: darkviolet;     font-style: italic; }  

my site made of 3 pages (chapt. 1,2 &3), named index1.html, index2.html , index3.html (all reside in same folder). in <nav id="nav_bar"> section there's unordered list of links (chapter 1, 2 & 3) link respective pages (chapter 1 index1.html, chapter 2 index2.html...).

this have done

<li><a href="index1.html" ></a>chapter i</li> <li><a href="index2.html"></a>chapter ii</li> <li><a href="index3.html"></a>chapter iii</li>   

the way anchor tags work, contents of tag link. tags don't have content.

instead, should use

<li><a href="index1.html">chapter i</a></li> <li><a href="index2.html">chapter ii</a></li> <li><a href="index3.html">chapter iii</a></li>   

notice have moved displayed text inside anchor tag, instead of beside it.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -