Tuesday 15 March 2011

html - why will my border not show? -



html - why will my border not show? -

the news div had outline property. added #main h2{} line outline disappeared. needed replace border property , give rounded border. have done help of w3schools.com guide, border still isn't showing.

edit: have updated code, has cleared entire news div.

#main { float: right; width: 45%; margin: 0 2.5%; outline: 2px dashed #0053ae; } #main h2 { font-family: 'oswald', sans-serif; } #news { float: right; width: 22.5%; margin: 0 0 0 2.5%; border: 5px dashed #ff6600; border-radius: 10px; }

here total code:

<!doctype html> <html> <head> <link href='http://fonts.googleapis.com/css?family=oswald' rel='stylesheet' type='text/css'> <meta charset="utf-8"> <title> mount olympus news </title> <style> #wrapper { width: 960px; margin: 0 auto; } #header { background-color: #ccc; padding: 15px;} #links { float: right; width: 22.5%; margin: 0 2.5% 0 0 ; outline: 2px dashed #dd0009; } #links h2 { font-family: 'oswald', sans-serif; } #main { float: right; width: 45%; margin: 0 2.5%; outline: 2px dashed #0053ae; } #main h2 { font-family: 'oswald', sans-serif; } #news { float: right; width: 22.5%; margin: 0 0 0 2.5%; border: 5px dashed #ff6600; border-radius: 10px; } #news h2 { font-family: 'oswald', sans-serif; } #footer { clear: right; padding: 15px; background: #ccc;} body { font-family: verdana, sans-serif; /* font-size: small; */ margin: 0; padding: 0;} ul { list-style: none; margin: 0; padding: 0; } li { margin-top: 1em; } </style> </head> <body> <div id="wrapper"> <div id="header"> <h1>mount olympus news</h1> </div> <div id="links"> <h2>links stories</h2> <ul id="stories"> <li><a href="">jupiter & mighty company</a></li> <li><a href="">the golden age</a></li> <li><a href="">the story of prometheus</a></li> <li><a href="">the flood</a></li> <li><a href="">the story of io</a></li> <li><a href="">the wonderful weaver</a></li> <li><a href="">cadmus , europa</a></li> <li><a href="">the quest medusa's head</a></li> <li><a href="">the story of atlanta</a></li> <li><a href="">the horse , olive</a></li> </ul> </div> <div id="main"> <h2>prometheus heats things up</h2> <p>prometheus did not care live amid clouds on mount top. busy that. while mighty folk spending time in idleness, drinking nectar , eating ambrosia, intent upon plans making world wiser , improve had ever been before.</p> <p>he went out amongst men live them , help them. ah, how poor , wretched were! found them living in caves , in holes of earth, shivering cold because there no fire, dying of starvation, hunted wild beasts , 1 another-the miserable of living creatures.</p> <p>"if had fire," said prometheus himself, "they @ to the lowest degree warm , cook food; , after while larn create tools , build houses. without fire, worse off beasts."</p> <p>then went boldly jupiter , begged him give fire men, might have little comfort through long, dreary months of winter.</p> <p>"not spark give," said jupiter. "no, indeed! why, if men had fire might become strong , wise ourselves, , after while drive out of our kingdom. best them poor , ignorant, mighty ones may thrive , happy."</p> <p>prometheus made no answer; had set heart on helping mankind, , did not give up. turned away, , left jupiter , mighty company forever.</p> <p>as walking shore of sea found reed, or, say, tall stalk of fennel, growing; , when had broken off saw hollow center filled dry, soft pith fire , maintain on fire long time. took long stalk in hands, , started towards dwelling of sun in far east.</p> <p>"mankind shall have fire in spite of tyrant sits on mount top," said.</p> <!-- <p>he reached place of sun in morning glowing, golden orb rising earth , origin daily journey through sky. touched end of long reed flames, , dry pith caught on fire , burned slowly. called of shivering men caves , built fire them, , showed them how warm , how build other fires coals. there cheerful blaze in every rude home in land, , men , women gathered round , warm , happy, , thankful prometheus wonderful gift had brought them sun.</p> <p>it not long until learned cook nutrient , eat men instead of beasts. began @ 1 time leave off wild , savage habits; , instead of lurking in dark places of world, came out open air , bright sunlight, , glad because life had been given them.</p> --> </div> <div id="news"> <h2>news</h2> <ul> <li><strong>pandora opens box!</strong><br /> disease , sorrow released plague mankind eternity. <a href="foo">more...</a></li> <li><strong>welcome hellenes.</strong><br /> boy of prometheus escapes great flood , creates new society tossed stones. <a href="foo">more...</a></li> <li><strong>a tangled web</strong><br /> arachne loses weave-off; changed spider. <a href="">more...</a></li> </ul> </div> <div id="footer"> <p>content taken <cite>old greek stories</cite> james baldwin (1914). copyright free text available @ <a href="http://www.gutenberg.net/1/1/5/8/11582/">project gutenberg</a>.</p> </div> </div> </body> </html>

you're not closing css tag after defining styles for:

#main h2 { font-family: 'oswald', sans-serif; )

the parenthesis above should replaced curly bracket this:

#main h2 { font-family: 'oswald', sans-serif; }

secondly, there's no border-style property of bold why border isn't appearing. can instead use:

#news { float: right; width: 22.5%; margin: 0 0 0 2.5% ; border: 5px solid #ff6600; border-radius: 25px; }

you can take @ available border-style's, can use, on here.

html css border

No comments:

Post a Comment