December 5, 201015 yr Right. I have been pulling my hair out over this one. What I have is a div which contains a paragraph of text, a few images and then another paragraph of text. Everything throughout the whole css file is left aligned, I have even put in text-align: left into the <p> tag, but the text still centre aligns! And this is just in firefox. IE is displaying correctly (for once!) Has anyone come across this before? How can it be solved? TIA
December 5, 201015 yr Author heh. Yeah, I guess it would. Oops! Anyhoo, now attached. I know it's messy, but I'm working on that. index.html style.css
December 5, 201015 yr I was just looking at this, please review this: HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- Title: Web Design Principles - Assignment 1 Code: UFIE84-20-2 Author: Daniel MacDonald - 09022238 Dated: 28 November 2010 URL: http://www.cems.uwe.ac.uk/~djmacon/wdp/project1 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="style.css" /> <script type="text/javascript" src="includes/lightbox.js"></script> <script type="text/javascript" src="includes/crumb.js"></script> <title>Home Page</title> </head> <body> <div id="wrapper"> <div id="header"> </div> <div id="menu"> <ul> <li><a href="#">Home<br /></a></li> <li><a href="about.html">About FFXIII<br /></a></li> <li><a href="form.html">Contact Form<br /></a></li> <li><a href="contact.html">Contact Details<br /></a></li> <li><a href="layout.html">Layout<br /></a></li> </ul> </div> <div id="content"> <div id="leftColumn"> <script type="text/javascript"> <!-- breadcrumbs(); --> </script> <br /><br /><br /> <!-- Script courtesy of http://twitter.com --> <script type="text/javascript" src="http://widgets.twimg.com/j/2/widget.js"></script> <script type="text/javascript"> new TWTR.Widget({ version: 2, type: 'search', search: 'final fantasy xiii', interval: 6000, title: 'News relating to...', subject: 'Final Fantasy XIII', width: '220', height: 370, theme: { shell: { background: '#bdcce9', color: '#ffffff' }, tweets: { background: '#ffffff', color: '#444444', links: '#1985b5' } }, features: { scrollbar: true, loop: true, live: false, hashtags: true, timestamp: true, avatars: true, toptweets: true, behavior: 'default' } }).render().start(); </script> </div> <div id="rightColumn"> <p align="left">Final Fantasy XIII was officially released on the 9th March 2010 and sold 1,321,000 copies in the first 24 hours in the UK & US. Bringing the total number of sales for the complete Final Fantasy series to 7.5 million copies worldwide since the first Final Fantasy in December 1987.</p> <div align="left"><br /> </div> <div id="leftImageColumn"> <div align="left"><a class="thumbnail" href="images/lightbox/ff_01_main.jpg" rel="lightbox"><span>The mighty steed, Sleipnir...</span><img src="images/lightbox/ff_01_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_02_main.jpg" rel="lightbox"><span>Serah Farron fights...</span><img src="images/lightbox/ff_02_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_03_main.jpg" rel="lightbox"><span>Flan. Not just for desert...</span><img src="images/lightbox/ff_03_thumb.jpg" alt="FFXIII" /></a><br /> </div> </div> <div id="centerImageColumn"> <div align="left"><a class="thumbnail" href="images/lightbox/ff_04_main.jpg" rel="lightbox"><span>The armoured vehicle Brynhildr...</span><img src="images/lightbox/ff_04_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_05_main.jpg" rel="lightbox"><span>In mid fight...</span><img src="images/lightbox/ff_05_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_06_main.jpg" rel="lightbox"><span>Thundara - lightening strikes...!</span><img src="images/lightbox/ff_06_thumb.jpg" alt="FFXIII" /></a><br /> </div> </div> <div id="rightImageColumn"> <div align="left"><a class="thumbnail" href="images/lightbox/ff_07_main.jpg" rel="lightbox"><span>Snow & Lightning - ready to fight...</span><img src="images/lightbox/ff_07_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_08_main.jpg" rel="lightbox"><span>Snow finds the power...</span><img src="images/lightbox/ff_08_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_09_main.jpg" rel="lightbox"><span>Cid Raines - 'The Cavelry'...</span><img src="images/lightbox/ff_09_thumb.jpg" alt="FFXIII" /></a> </div> </div> <p align="left"> </p> <p align="left"> </p> <p align="left"> </p> <p align="left">Final Fantasy XIII is set within the world of Pulse. Central to the story is Cocoon, an artificial sphere that floats above Pulse's surface and is ruled by the Sanctum, a theocratic government. The worlds are controlled by fal'Cie (, mechanical beings with godlike power, each based around a crystal and created by a god-like figure called the Maker. The Cocoon fal'Cie are additionally responsible for keeping Cocoon floating, as well as providing light and water.</p> <p align="left">Each fal'Cie handles a specific task. The fal'Cie have the capability of marking the humans, also created by the Maker, that live in Pulse and Cocoon as their servants. These servants, called l'Cie, are branded with a symbol representing either Pulse or Cocoon, and are additionally given a "Focus", a task to complete. If the l'Cie complete their task in time, they are transformed to crystal and gain eternal life (as said in the legend); otherwise they become mindless monsters called Cie'th. Five hundred years before the events of the game, two l'Cie named Oerba Dia Vanille and Oerba Yun Fang initiated a conflict that would later be known as the War of Transgression. This quarrel grew to catastrophic proportions, causing a war between Cocoon and Pulse, and ripped a large hole in Cocoon in the process.</p> </div> </div> <div id="footer"> 2010 - 09022238 - Daniel MacDonald </div> </div> </body> </html> CSS /* ---------------------------------------------------------------------------- Web Design Principles - Assignment 1 Daniel MacDonald - 09022238 09 December 2010 ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- Divs have been indented to show parent/child structure within the overall design --------------------------------------------------------------------------*/ body { font: bold 14px arial, san-serif; margin: 0px auto 0px auto; background-image: url('../images/ff_xii_background.png'); background-repeat: no-repeat; background-attachment: fixed; background-position: center; } /* Create equal margin around images ----------------------------------*/ img { margin: 3.5% 3.5% 3.5% 3.5%; border-color: #303030; } /* ---------------------------------------------------------------------------- Tooltip code courtesy of http://www.dynamicdrive.com/style/ --------------------------------------------------------------------------*/ .thumbnail { position: relative; z-index: 0; } .thumbnail:hover { background-color: transparent; z-index: 50; } .thumbnail span { position: absolute; background-color: #bdcce9; padding: 5px; left: -1000px; border: 1px solid #8494b4; visibility: hidden; color: white; text-decoration: none; width: 160px; \width: 170px; } .thumbnail span img { border-width: 0; padding: 2px; } .thumbnail:hover span { visibility: visible; top: -90px; left: 7px; } #wrapper { width: 75%; min-width: 900px; margin-left: auto; margin-right: auto; } #header { height: 98px; background: center; background-image: url('../images/ff_xii_header.png'); background-repeat: no-repeat; } #footer { float: left; padding: 10px 0 10px 0; width: 100%; background: #303030; color: #fff; line-height: 0.8em; text-align: center; } /* Start of menu -------------------------------------------------------------*/ #menu { height: 10px; background: #303030; color: #fff; margin: 0px; padding: 10px; } #menu ul { margin: 0px; padding: 0px; } #menu ul li { display: block; padding: 0px; float: left; text-align: left; margin-right: 2em; } #menu li a { color: #fff; text-decoration: none; line-height: 0.8em; display: block; } #menu li a:hover { color: #8181b7; } /* End of menu ---------------------------------------------------------------*/ #content { background: #fff; float: left; font: 14px verdana, arial; color: #000; width: 100%; } #leftColumn { float: left; width: 200px; padding: 10px; \width: 240px; font: 10px verdana, arial; } #rightColumn { margin: 0 0 0 200px; padding: 5%; width: auto; text-align: center; } #leftImageColumn { width: 32%; float: left; } #centerImageColumn { width: 32%; float: left; } #rightImageColumn { width: 32%; float: left; } .vcard, .form { padding: 0.5em; background: #ccc; border: 1px solid black; margin: 5em 2em 0 2em; font-size: 90%; } .textDiv { text-align: left; float: left; min-width: 0px; } /* Start of lightbox ---------------------------------------------------------*/ #lightbox { background-color: #eee; padding: 10px; border-bottom: 2px solid #666; border-right: 2px solid #666; } #lightboxDetails { font-size: 0.8em; padding-top: 0.4em; } #lightboxCaption { float: left; } #keyboardMsg { float: right; } #closeButton { top: 5px; right: 5px; } #lightbox img { border: none; clear: both; } #overlay img { border: none; } #overlay { background-image: url('images/overlay.png'); } * html #overlay { background-color: #333; background-color: transparent; background-image: url('blank.gif'); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="overlay.png", sizingMethod="scale"); } img { } /* End of lightbox -----------------------------------------------------------*/
December 5, 201015 yr I was just looking at this, please review this: HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- Title: Web Design Principles - Assignment 1 Code: UFIE84-20-2 Author: Daniel MacDonald - 09022238 Dated: 28 November 2010 URL: http://www.cems.uwe....on/wdp/project1 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="style.css" /> <script type="text/javascript" src="includes/lightbox.js"></script> <script type="text/javascript" src="includes/crumb.js"></script> <title>Home Page</title> </head> <body> <div id="wrapper"> <div id="header"> </div> <div id="menu"> <ul> <li><a href="#">Home<br /></a></li> <li><a href="about.html">About FFXIII<br /></a></li> <li><a href="form.html">Contact Form<br /></a></li> <li><a href="contact.html">Contact Details<br /></a></li> <li><a href="layout.html">Layout<br /></a></li> </ul> </div> <div id="content"> <div id="leftColumn"> <script type="text/javascript"> <!-- breadcrumbs(); --> </script> <br /><br /><br /> <!-- Script courtesy of http://twitter.com --> <script type="text/javascript" src="http://widgets.twimg.com/j/2/widget.js"></script> <script type="text/javascript"> new TWTR.Widget({ version: 2, type: 'search', search: 'final fantasy xiii', interval: 6000, title: 'News relating to...', subject: 'Final Fantasy XIII', width: '220', height: 375, theme: { shell: { background: '#bdcce9', color: '#ffffff' }, tweets: { background: '#ffffff', color: '#444444', links: '#1985b5' } }, features: { scrollbar: true, loop: true, live: false, hashtags: true, timestamp: true, avatars: true, toptweets: true, behavior: 'default' } }).render().start(); </script> </div> <div id="rightColumn"> <p align="left">Final Fantasy XIII was officially released on the 9th March 2010 and sold 1,321,000 copies in the first 24 hours in the UK & US. Bringing the total number of sales for the complete Final Fantasy series to 7.5 million copies worldwide since the first Final Fantasy in December 1987.</p> <div align="left"><br /> </div> <div id="leftImageColumn"> <div align="left"><a class="thumbnail" href="images/lightbox/ff_01_main.jpg" rel="lightbox"><span>The mighty steed, Sleipnir...</span><img src="images/lightbox/ff_01_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_02_main.jpg" rel="lightbox"><span>Serah Farron fights...</span><img src="images/lightbox/ff_02_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_03_main.jpg" rel="lightbox"><span>Flan. Not just for desert...</span><img src="images/lightbox/ff_03_thumb.jpg" alt="FFXIII" /></a><br /> </div> </div> <div id="centerImageColumn"> <div align="left"><a class="thumbnail" href="images/lightbox/ff_04_main.jpg" rel="lightbox"><span>The armoured vehicle Brynhildr...</span><img src="images/lightbox/ff_04_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_05_main.jpg" rel="lightbox"><span>In mid fight...</span><img src="images/lightbox/ff_05_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_06_main.jpg" rel="lightbox"><span>Thundara - lightening strikes...!</span><img src="images/lightbox/ff_06_thumb.jpg" alt="FFXIII" /></a><br /> </div> </div> <div id="rightImageColumn"> <div align="left"><a class="thumbnail" href="images/lightbox/ff_07_main.jpg" rel="lightbox"><span>Snow & Lightning - ready to fight...</span><img src="images/lightbox/ff_07_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_08_main.jpg" rel="lightbox"><span>Snow finds the power...</span><img src="images/lightbox/ff_08_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_09_main.jpg" rel="lightbox"><span>Cid Raines - 'The Cavelry'...</span><img src="images/lightbox/ff_09_thumb.jpg" alt="FFXIII" /></a> </div> </div> <p align="left"> </p> <p align="left"> </p> <p align="left"> </p> <p align="left">Final Fantasy XIII is set within the world of Pulse. Central to the story is Cocoon, an artificial sphere that floats above Pulse's surface and is ruled by the Sanctum, a theocratic government. The worlds are controlled by fal'Cie (, mechanical beings with godlike power, each based around a crystal and created by a god-like figure called the Maker. The Cocoon fal'Cie are additionally responsible for keeping Cocoon floating, as well as providing light and water.</p> <p align="left">Each fal'Cie handles a specific task. The fal'Cie have the capability of marking the humans, also created by the Maker, that live in Pulse and Cocoon as their servants. These servants, called l'Cie, are branded with a symbol representing either Pulse or Cocoon, and are additionally given a "Focus", a task to complete. If the l'Cie complete their task in time, they are transformed to crystal and gain eternal life (as said in the legend); otherwise they become mindless monsters called Cie'th. Five hundred years before the events of the game, two l'Cie named Oerba Dia Vanille and Oerba Yun Fang initiated a conflict that would later be known as the War of Transgression. This quarrel grew to catastrophic proportions, causing a war between Cocoon and Pulse, and ripped a large hole in Cocoon in the process.</p> </div> </div> <div id="footer"> 2010 - 09022238 - Daniel MacDonald </div> </div> </body> </html> CSS /* ---------------------------------------------------------------------------- Web Design Principles - Assignment 1 Daniel MacDonald - 09022238 09 December 2010 ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- Divs have been indented to show parent/child structure within the overall design --------------------------------------------------------------------------*/ body { font: bold 14px arial, san-serif; margin: 0px auto 0px auto; background-image: url('../images/ff_xii_background.png'); background-repeat: no-repeat; background-attachment: fixed; background-position: center; } /* Create equal margin around images ----------------------------------*/ img { margin: 3.5% 3.5% 3.5% 3.5%; border-color: #303030; } /* ---------------------------------------------------------------------------- Tooltip code courtesy of http://www.dynamicdrive.com/style/ --------------------------------------------------------------------------*/ .thumbnail { position: relative; z-index: 0; } .thumbnail:hover { background-color: transparent; z-index: 50; } .thumbnail span { position: absolute; background-color: #bdcce9; padding: 5px; left: -1000px; border: 1px solid #8494b4; visibility: hidden; color: white; text-decoration: none; width: 160px; \width: 170px; } .thumbnail span img { border-width: 0; padding: 2px; } .thumbnail:hover span { visibility: visible; top: -90px; left: 7px; } #wrapper { width: 75%; min-width: 900px; margin-left: auto; margin-right: auto; } #header { height: 98px; background: center; background-image: url('../images/ff_xii_header.png'); background-repeat: no-repeat; } #footer { float: left; padding: 10px 0 10px 0; width: 100%; background: #303030; color: #fff; line-height: 0.8em; text-align: center; } /* Start of menu -------------------------------------------------------------*/ #menu { height: 10px; background: #303030; color: #fff; margin: 0px; padding: 10px; } #menu ul { margin: 0px; padding: 0px; } #menu ul li { display: block; padding: 0px; float: left; text-align: left; margin-right: 2em; } #menu li a { color: #fff; text-decoration: none; line-height: 0.8em; display: block; } #menu li a:hover { color: #8181b7; } /* End of menu ---------------------------------------------------------------*/ #content { background: #fff; float: left; font: 14px verdana, arial; color: #000; width: 100%; } #leftColumn { float: left; width: 200px; padding: 10px; \width: 240px; font: 10px verdana, arial; } #rightColumn { margin: 0 0 0 200px; padding: 5%; width: auto; text-align: center; } #leftImageColumn { width: 32%; float: left; } #centerImageColumn { width: 32%; float: left; } #rightImageColumn { width: 32%; float: left; } .vcard, .form { padding: 0.5em; background: #ccc; border: 1px solid black; margin: 5em 2em 0 2em; font-size: 90%; } .textDiv { text-align: left; float: left; min-width: 0px; } /* Start of lightbox ---------------------------------------------------------*/ #lightbox { background-color: #eee; padding: 10px; border-bottom: 2px solid #666; border-right: 2px solid #666; } #lightboxDetails { font-size: 0.8em; padding-top: 0.4em; } #lightboxCaption { float: left; } #keyboardMsg { float: right; } #closeButton { top: 5px; right: 5px; } #lightbox img { border: none; clear: both; } #overlay img { border: none; } #overlay { background-image: url('images/overlay.png'); } * html #overlay { background-color: #333; background-color: transparent; background-image: url('blank.gif'); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="overlay.png", sizingMethod="scale"); } img { } /* End of lightbox -----------------------------------------------------------*/
December 5, 201015 yr Author Yes, that does work, unfortunately all styling must be done using the CSS file (this is for an assignment and I will get marked down for that!)
December 5, 201015 yr Pleased it worked for you, amended again sorry should have seen the Strict Doc type HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- Title: Web Design Principles - Assignment 1 Code: UFIE84-20-2 Author: Daniel MacDonald - 09022238 Dated: 28 November 2010 URL: http://www.cems.uwe.ac.uk/~djmacon/wdp/project1 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="style.css" /> <script type="text/javascript" src="includes/lightbox.js"></script> <script type="text/javascript" src="includes/crumb.js"></script> <title>Home Page</title> </head> <body> <div id="wrapper"> <div id="header"> </div> <div id="menu"> <ul> <li><a href="#">Home<br /></a></li> <li><a href="about.html">About FFXIII<br /></a></li> <li><a href="form.html">Contact Form<br /></a></li> <li><a href="contact.html">Contact Details<br /></a></li> <li><a href="layout.html">Layout<br /></a></li> </ul> </div> <div id="content"> <div id="leftColumn"> <script type="text/javascript"> <!-- breadcrumbs(); --> </script> <br /><br /><br /> <!-- Script courtesy of http://twitter.com --> <script type="text/javascript" src="http://widgets.twimg.com/j/2/widget.js"></script> <script type="text/javascript"> new TWTR.Widget({ version: 2, type: 'search', search: 'final fantasy xiii', interval: 6000, title: 'News relating to...', subject: 'Final Fantasy XIII', width: '220', height: 385, theme: { shell: { background: '#bdcce9', color: '#ffffff' }, tweets: { background: '#ffffff', color: '#444444', links: '#1985b5' } }, features: { scrollbar: true, loop: true, live: false, hashtags: true, timestamp: true, avatars: true, toptweets: true, behavior: 'default' } }).render().start(); </script> </div> <div id="rightColumn"> <p>Final Fantasy XIII was officially released on the 9th March 2010 and sold 1,321,000 copies in the first 24 hours in the UK & US. Bringing the total number of sales for the complete Final Fantasy series to 7.5 million copies worldwide since the first Final Fantasy in December 1987.</p> <div><br /> </div> <div id="leftImageColumn"> <div><a class="thumbnail" href="images/lightbox/ff_01_main.jpg" rel="lightbox"><span>The mighty steed, Sleipnir...</span><img src="images/lightbox/ff_01_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_02_main.jpg" rel="lightbox"><span>Serah Farron fights...</span><img src="images/lightbox/ff_02_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_03_main.jpg" rel="lightbox"><span>Flan. Not just for desert...</span><img src="images/lightbox/ff_03_thumb.jpg" alt="FFXIII" /></a><br /> </div> </div> <div id="centerImageColumn"> <div><a class="thumbnail" href="images/lightbox/ff_04_main.jpg" rel="lightbox"><span>The armoured vehicle Brynhildr...</span><img src="images/lightbox/ff_04_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_05_main.jpg" rel="lightbox"><span>In mid fight...</span><img src="images/lightbox/ff_05_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_06_main.jpg" rel="lightbox"><span>Thundara - lightening strikes...!</span><img src="images/lightbox/ff_06_thumb.jpg" alt="FFXIII" /></a><br /> </div> </div> <div id="rightImageColumn"> <div><a class="thumbnail" href="images/lightbox/ff_07_main.jpg" rel="lightbox"><span>Snow & Lightning - ready to fight...</span><img src="images/lightbox/ff_07_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_08_main.jpg" rel="lightbox"><span>Snow finds the power...</span><img src="images/lightbox/ff_08_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_09_main.jpg" rel="lightbox"><span>Cid Raines - 'The Cavelry'...</span><img src="images/lightbox/ff_09_thumb.jpg" alt="FFXIII" /></a> </div> </div> <p> </p> <p> </p> <p> </p> <p>Final Fantasy XIII is set within the world of Pulse. Central to the story is Cocoon, an artificial sphere that floats above Pulse's surface and is ruled by the Sanctum, a theocratic government. The worlds are controlled by fal'Cie (, mechanical beings with godlike power, each based around a crystal and created by a god-like figure called the Maker. The Cocoon fal'Cie are additionally responsible for keeping Cocoon floating, as well as providing light and water.</p> <p>Each fal'Cie handles a specific task. The fal'Cie have the capability of marking the humans, also created by the Maker, that live in Pulse and Cocoon as their servants. These servants, called l'Cie, are branded with a symbol representing either Pulse or Cocoon, and are additionally given a "Focus", a task to complete. If the l'Cie complete their task in time, they are transformed to crystal and gain eternal life (as said in the legend); otherwise they become mindless monsters called Cie'th. Five hundred years before the events of the game, two l'Cie named Oerba Dia Vanille and Oerba Yun Fang initiated a conflict that would later be known as the War of Transgression. This quarrel grew to catastrophic proportions, causing a war between Cocoon and Pulse, and ripped a large hole in Cocoon in the process.</p> </div> </div> <div id="footer"> 2010 - 09022238 - Daniel MacDonald </div> </div> </body> </html> CSS /* ---------------------------------------------------------------------------- Web Design Principles - Assignment 1 Daniel MacDonald - 09022238 09 December 2010 ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- Divs have been indented to show parent/child structure within the overall design --------------------------------------------------------------------------*/ body { font: bold 14px arial, san-serif; margin: 0px auto 0px auto; background-image: url('../images/ff_xii_background.png'); background-repeat: no-repeat; background-attachment: fixed; background-position: center; } /* Create equal margin around images ----------------------------------*/ img { margin: 3.5% 3.5% 3.5% 3.5%; border-color: #303030; } /* ---------------------------------------------------------------------------- Tooltip code courtesy of http://www.dynamicdrive.com/style/ --------------------------------------------------------------------------*/ .thumbnail { position: relative; z-index: 0; } .thumbnail:hover { background-color: transparent; z-index: 50; } .thumbnail span { position: absolute; background-color: #bdcce9; padding: 5px; left: -1000px; border: 1px solid #8494b4; visibility: hidden; color: white; text-decoration: none; width: 160px; \width: 170px; } .thumbnail span img { border-width: 0; padding: 2px; } .thumbnail:hover span { visibility: visible; top: -90px; left: 7px; } #wrapper { width: 75%; min-width: 900px; margin-left: auto; margin-right: auto; } #header { height: 98px; background: center; background-image: url('../images/ff_xii_header.png'); background-repeat: no-repeat; } #footer { float: left; padding: 10px 0 10px 0; width: 100%; background: #303030; color: #fff; line-height: 0.8em; text-align: center; } /* Start of menu -------------------------------------------------------------*/ #menu { height: 10px; background: #303030; color: #fff; margin: 0px; padding: 10px; } #menu ul { margin: 0px; padding: 0px; } #menu ul li { display: block; padding: 0px; float: left; text-align: left; margin-right: 2em; } #menu li a { color: #fff; text-decoration: none; line-height: 0.8em; display: block; } #menu li a:hover { color: #8181b7; } /* End of menu ---------------------------------------------------------------*/ #content { background: #fff; float: left; font: 14px verdana, arial; color: #000; width: 100%; } #leftColumn { float: left; width: 200px; padding: 10px; \width: 240px; font: 10px verdana, arial; } #rightColumn { margin: 0 0 0 200px; padding: 5%; width: auto; text-align: left; } #leftImageColumn { width: 32%; float: left; } #centerImageColumn { width: 32%; float: left; } #rightImageColumn { width: 32%; float: left; } .vcard, .form { padding: 0.5em; background: #ccc; border: 1px solid black; margin: 5em 2em 0 2em; font-size: 90%; } .textDiv { text-align: left; float: left; min-width: 0px; } /* Start of lightbox ---------------------------------------------------------*/ #lightbox { background-color: #eee; padding: 10px; border-bottom: 2px solid #666; border-right: 2px solid #666; } #lightboxDetails { font-size: 0.8em; padding-top: 0.4em; } #lightboxCaption { float: left; } #keyboardMsg { float: right; } #closeButton { top: 5px; right: 5px; } #lightbox img { border: none; clear: both; } #overlay img { border: none; } #overlay { background-image: url('images/overlay.png'); } * html #overlay { background-color: #333; background-color: transparent; background-image: url('blank.gif'); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="overlay.png", sizingMethod="scale"); } img { } /* End of lightbox -----------------------------------------------------------*/
December 5, 201015 yr In your #rightColumn you have text-align:center, which is what is making your text centered. If you need other elements in your rightColumn to be central while the paragraphs aligned left you can add this to your css under the #rightColumn. #rightColumn p { text-align:left;}
December 5, 201015 yr Author Thank you both! It's working now. I don't even know how I didn't see that! Sometimes I wonder if I'm on the right course....
December 5, 201015 yr Not a problem, trust you took the HTML code from my last post above. It validates fine now too only a " issue which I amended and whilst the CSS comment above was correct it didn't take into account the Twitter feed widget which having resized it will give you an even layout. If the widget wasn't changed in Chrome and IE+ the last 3 lines indent slightly further left. regards, R
December 5, 201015 yr Author Yes, I went through the code and made the changes. Another question though. In IE, the text touches the edge of the div, how can I move it in a bit so there is a gap? I have tried using margin and padding with no luck. TIA
December 5, 201015 yr My suggestion <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- Title: Web Design Principles - Assignment 1 Code: UFIE84-20-2 Author: Daniel MacDonald - 09022238 Dated: 28 November 2010 URL: http://www.cems.uwe.ac.uk/~djmacon/wdp/project1 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="style.css" /> <script type="text/javascript" src="includes/lightbox.js"></script> <script type="text/javascript" src="includes/crumb.js"></script> <title>Home Page</title> </head> <body> <div id="wrapper"> <div id="header"> </div> <div id="menu"> <ul> <li><a href="#">Home<br /></a></li> <li><a href="about.html">About FFXIII<br /></a></li> <li><a href="form.html">Contact Form<br /></a></li> <li><a href="contact.html">Contact Details<br /></a></li> <li><a href="layout.html">Layout<br /></a></li> </ul> </div> <div id="content"> <div id="leftColumn"> <script type="text/javascript"> <!-- breadcrumbs(); --> </script> <br /><br /><br /> <!-- Script courtesy of http://twitter.com --> <script type="text/javascript" src="http://widgets.twimg.com/j/2/widget.js"></script> <script type="text/javascript"> new TWTR.Widget({ version: 2, type: 'search', search: 'final fantasy xiii', interval: 6000, title: 'News relating to...', subject: 'Final Fantasy XIII', width: '220', height: 385, theme: { shell: { background: '#bdcce9', color: '#ffffff' }, tweets: { background: '#ffffff', color: '#444444', links: '#1985b5' } }, features: { scrollbar: true, loop: true, live: false, hashtags: true, timestamp: true, avatars: true, toptweets: true, behavior: 'default' } }).render().start(); </script> </div> <div id="rightColumn"> <blockquote> <p>Final Fantasy XIII was officially released on the 9th March 2010 and sold 1,321,000 copies in the first 24 hours in the UK & US. Bringing the total number of sales for the complete Final Fantasy series to 7.5 million copies worldwide since the first Final Fantasy in December 1987.</p> </blockquote> <div> <blockquote> <p><br /> </p> </blockquote> </div> <div id="leftImageColumn"> <div><a class="thumbnail" href="images/lightbox/ff_01_main.jpg" rel="lightbox"><span>The mighty steed, Sleipnir...</span><img src="images/lightbox/ff_01_thumb.jpg" alt="FFXIII" /></a> <blockquote> <p><br /> </p> </blockquote> <a class="thumbnail" href="images/lightbox/ff_02_main.jpg" rel="lightbox"><span>Serah Farron fights...</span><img src="images/lightbox/ff_02_thumb.jpg" alt="FFXIII" /></a> <blockquote> <p><br /> </p> </blockquote> <a class="thumbnail" href="images/lightbox/ff_03_main.jpg" rel="lightbox"><span>Flan. Not just for desert...</span><img src="images/lightbox/ff_03_thumb.jpg" alt="FFXIII" /></a> <blockquote> <p><br /> </p> </blockquote> </div> </div> <div id="centerImageColumn"> <div><a class="thumbnail" href="images/lightbox/ff_04_main.jpg" rel="lightbox"><span>The armoured vehicle Brynhildr...</span><img src="images/lightbox/ff_04_thumb.jpg" alt="FFXIII" /></a> <blockquote> <p><br /> </p> </blockquote> <a class="thumbnail" href="images/lightbox/ff_05_main.jpg" rel="lightbox"><span>In mid fight...</span><img src="images/lightbox/ff_05_thumb.jpg" alt="FFXIII" /></a> <blockquote> <p><br /> </p> </blockquote> <a class="thumbnail" href="images/lightbox/ff_06_main.jpg" rel="lightbox"><span>Thundara - lightening strikes...!</span><img src="images/lightbox/ff_06_thumb.jpg" alt="FFXIII" /></a> <blockquote> <p><br /> </p> </blockquote> </div> </div> <div id="rightImageColumn"> <div><a class="thumbnail" href="images/lightbox/ff_07_main.jpg" rel="lightbox"><span>Snow & Lightning - ready to fight...</span><img src="images/lightbox/ff_07_thumb.jpg" alt="FFXIII" /></a> <blockquote> <p><br /> </p> </blockquote> <a class="thumbnail" href="images/lightbox/ff_08_main.jpg" rel="lightbox"><span>Snow finds the power...</span><img src="images/lightbox/ff_08_thumb.jpg" alt="FFXIII" /></a> <blockquote> <p><br /> </p> </blockquote> <a class="thumbnail" href="images/lightbox/ff_09_main.jpg" rel="lightbox"><span>Cid Raines - 'The Cavelry'...</span><img src="images/lightbox/ff_09_thumb.jpg" alt="FFXIII" /></a> </div> </div> <blockquote> <p> </p> <p> </p> <p> </p> <p>Final Fantasy XIII is set within the world of Pulse. Central to the story is Cocoon, an artificial sphere that floats above Pulse's surface and is ruled by the Sanctum, a theocratic government. The worlds are controlled by fal'Cie (, mechanical beings with godlike power, each based around a crystal and created by a god-like figure called the Maker. The Cocoon fal'Cie are additionally responsible for keeping Cocoon floating, as well as providing light and water.</p> <p>Each fal'Cie handles a specific task. The fal'Cie have the capability of marking the humans, also created by the Maker, that live in Pulse and Cocoon as their servants. These servants, called l'Cie, are branded with a symbol representing either Pulse or Cocoon, and are additionally given a "Focus", a task to complete. If the l'Cie complete their task in time, they are transformed to crystal and gain eternal life (as said in the legend); otherwise they become mindless monsters called Cie'th. Five hundred years before the events of the game, two l'Cie named Oerba Dia Vanille and Oerba Yun Fang initiated a conflict that would later be known as the War of Transgression. This quarrel grew to catastrophic proportions, causing a war between Cocoon and Pulse, and ripped a large hole in Cocoon in the process.</p> </blockquote> </div> </div> <div id="footer"> 2010 - 09022238 - Daniel MacDonald </div> </div> </body> </html>
December 5, 201015 yr You shouldn't use random tags just to achieve somthething, each tag has a purpose and should only really be used for that purpose. In the example above <blockquote> is being used for no reason and also there are a lot of empty tags such as <p> <br /> </p> and <p> </p>, it may validate but its a bad practice and adds unnecessary code to your site. If you are getting marked on how good your coding practices are then the above isn't the best example of how to achieve what you are after. Spacing can easily be achieved through css rather than multiple empty paragraph tags. <blockquote> is for quoting something someone has said that is quite lengthy. For your padding of text you could do this, #rightColumn p { text-align:left; padding:5px;} That would add a 5px padding all around the text in a paragraph, if you just wanted it on the left and right of the text you could do this: #rightColumn p { text-align:left; padding: 0px 5px;} 0px = top and bottom, 5px = left and right. Hope that helps
December 5, 201015 yr Author Thanks again. But this does not affect the text hitting the right side of the div for IE. And now for some bizarre reason, IE has decided to jump the bottom paragraph to the right of the images. This is getting very frustrating
December 5, 201015 yr Can I see the html and css code that you have at the minute, I might be able to spot what's making it go wrong.
December 5, 201015 yr Author Here you go: /* ---------------------------------------------------------------------------- Web Design Principles - Assignment 1 Daniel MacDonald - 09022238 09 December 2010 ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- Divs have been indented to show parent/child structure within the overall design --------------------------------------------------------------------------*/ body { font: bold 14px arial, san-serif; margin: 0px auto 0px auto; background-image: url('../images/ff_xii_background.png'); background-repeat: no-repeat; background-attachment: fixed; background-position: center; } /* Create equal margin around images ----------------------------------*/ img { margin: 3.5% 3.5% 3.5% 3.5%; border-color: #303030; } /* ---------------------------------------------------------------------------- Tooltip code courtesy of http://www.dynamicdrive.com/style/ --------------------------------------------------------------------------*/ .thumbnail { position: relative; z-index: 0; } .thumbnail:hover { background-color: transparent; z-index: 50; } .thumbnail span { position: absolute; background-color: #bdcce9; padding: 5px; left: -1000px; border: 1px solid #8494b4; visibility: hidden; color: white; text-decoration: none; width: 160px; \width: 170px; } .thumbnail span img { border-width: 0; padding: 2px; } .thumbnail:hover span { visibility: visible; top: -90px; left: 7px; } #wrapper { width: 75%; min-width: 900px; margin-left: auto; margin-right: auto; } #header { height: 98px; background: center; background-image: url('../images/ff_xii_header.png'); background-repeat: no-repeat; } #footer { float: left; padding: 10px 0 10px 0; width: 100%; background: #303030; color: #fff; line-height: 0.8em; text-align: center; } /* Start of menu -------------------------------------------------------------*/ #menu { height: 10px; background: #303030; color: #fff; margin: 0px; padding: 10px; } #menu ul { margin: 0px; padding: 0px; } #menu ul li { display: block; padding: 0px; float: left; text-align: left; margin-right: 2em; } #menu li a { color: #fff; text-decoration: none; line-height: 0.8em; display: block; } #menu li a:hover { color: #8181b7; } /* End of menu ---------------------------------------------------------------*/ #content { background: #fff; opacity: 0.95; float: left; font: 14px verdana, arial; color: #000; width: 100%; } #leftColumn { float: left; width: 200px; padding: 10px; \width: 240px; font: 10px verdana, arial; } #rightColumn p { margin: 0 0 0 200px; padding: 0 5px 0 5px; width: auto; text-align: left; } .imageBox { text-align: center; } #leftImageColumn { width: 33%; float: left; } #centerImageColumn { width: 33%; float: left; } #rightImageColumn { width: 33%; float: left; } .vcard, .form { padding: 0.5em; background: #ccc; border: 1px solid black; margin: 5em 2em 0 2em; font-size: 90%; } /* Start of lightbox ---------------------------------------------------------*/ #lightbox { background-color: #eee; padding: 10px; border-bottom: 2px solid #666; border-right: 2px solid #666; } #lightboxDetails { font-size: 0.8em; padding-top: 0.4em; } #lightboxCaption { float: left; } #keyboardMsg { float: right; } #closeButton { top: 5px; right: 5px; } #lightbox img { border: none; clear: both; } #overlay img { border: none; } #overlay { background-image: url('images/overlay.png'); } * html #overlay { background-color: #333; background-color: transparent; background-image: url('blank.gif'); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="overlay.png", sizingMethod="scale"); } /* End of lightbox -----------------------------------------------------------*/ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- Title: Web Design Principles - Assignment 1 Code: UFIE84-20-2 Author: Daniel MacDonald - 09022238 Dated: 28 November 2010 URL: http://www.cems.uwe.ac.uk/~djmacon/wdp/project1 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="includes/style.css" /> <!--[if IE]> <link rel=stylesheet" type="text/css" href="inclues/style.css" /> <![endif] --> <script type="text/javascript" src="includes/lightbox.js"></script> <script type="text/javascript" src="includes/crumb.js"></script> <title>Home Page</title> </head> <body> <div id="wrapper"> <div id="header"> </div> <div id="menu"> <ul> <li><a href="#">Home<br /></a></li> <li><a href="about.html">About FFXIII<br /></a></li> <li><a href="form.html">Contact Form<br /></a></li> <li><a href="contact.html">Contact Details<br /></a></li> <li><a href="layout.html">Layout<br /></a></li> </ul> </div> <div id="content"> <div id="leftColumn"> <script type="text/javascript"> <!-- breadcrumbs(); --> </script> <br /><br /><br /> <!-- Script courtesy of http://twitter.com --> <script type="text/javascript" src="http://widgets.twimg.com/j/2/widget.js"></script> <script type="text/javascript"> new TWTR.Widget({ version: 2, type: 'search', search: 'final fantasy xiii', interval: 6000, title: 'News relating to...', subject: 'Final Fantasy XIII', width: '220', height: 385, theme: { shell: { background: '#bdcce9', color: '#ffffff' }, tweets: { background: '#ffffff', color: '#444444', links: '#1985b5' } }, features: { scrollbar: true, loop: true, live: false, hashtags: true, timestamp: true, avatars: true, toptweets: true, behavior: 'default' } }).render().start(); </script> </div> <div id="rightColumn"> <!--[if IE]> <br /> <![endif]--> <p>Final Fantasy XIII was officially released on the 9th March 2010 and sold 1,321,000 copies in the first 24 hours in the UK & US. Bringing the total number of sales for the complete Final Fantasy series to 7.5 million copies worldwide since the first Final Fantasy in December 1987.</p> <br /><br /> <div class="imageBox"> <div id="leftImageColumn"> <a class="thumbnail" href="images/lightbox/ff_01_main.jpg" rel="lightbox"><span>The mighty steed, Sleipnir...</span><img src="images/lightbox/ff_01_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_02_main.jpg" rel="lightbox"><span>Serah Farron fights...</span><img src="images/lightbox/ff_02_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_03_main.jpg" rel="lightbox"><span>Flan. Not just for desert...</span><img src="images/lightbox/ff_03_thumb.jpg" alt="FFXIII" /></a><br /> </div> <div id="centerImageColumn"> <a class="thumbnail" href="images/lightbox/ff_04_main.jpg" rel="lightbox"><span>The armoured vehicle Brynhildr...</span><img src="images/lightbox/ff_04_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_05_main.jpg" rel="lightbox"><span>In mid fight...</span><img src="images/lightbox/ff_05_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_06_main.jpg" rel="lightbox"><span>Thundara - lightening strikes...!</span><img src="images/lightbox/ff_06_thumb.jpg" alt="FFXIII" /></a><br /> </div> <div id="rightImageColumn"> <a class="thumbnail" href="images/lightbox/ff_07_main.jpg" rel="lightbox"><span>Snow & Lightning - ready to fight...</span><img src="images/lightbox/ff_07_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_08_main.jpg" rel="lightbox"><span>Snow finds the power...</span><img src="images/lightbox/ff_08_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_09_main.jpg" rel="lightbox"><span>Cid Raines - 'The Cavelry'...</span><img src="images/lightbox/ff_09_thumb.jpg" alt="FFXIII" /></a> </div> </div> <p>Final Fantasy XIII is set within the world of Pulse. Central to the story is Cocoon, an artificial sphere that floats above Pulse's surface and is ruled by the Sanctum, a theocratic government. The worlds are controlled by fal'Cie (, mechanical beings with godlike power, each based around a crystal and created by a god-like figure called the Maker. The Cocoon fal'Cie are additionally responsible for keeping Cocoon floating, as well as providing light and water.</p> <!--[if IE]> <br /><br /> <![endif]--> <p>Each fal'Cie handles a specific task. The fal'Cie have the capability of marking the humans, also created by the Maker, that live in Pulse and Cocoon as their servants. These servants, called l'Cie, are branded with a symbol representing either Pulse or Cocoon, and are additionally given a "Focus", a task to complete. If the l'Cie complete their task in time, they are transformed to crystal and gain eternal life (as said in the legend); otherwise they become mindless monsters called Cie'th. Five hundred years before the events of the game, two l'Cie named Oerba Dia Vanille and Oerba Yun Fang initiated a conflict that would later be known as the War of Transgression. This quarrel grew to catastrophic proportions, causing a war between Cocoon and Pulse, and ripped a large hole in Cocoon in the process.</p> </div> </div> <div id="footer"> 2010 - 09022238 - Daniel MacDonald </div> </div> </body> </html>
December 5, 201015 yr Hi Fox just reseen this. Would you be kind enough to save this HTML and CSS as perhaps another file and CSS as style2 for example. Just comment on how it works OK for you. HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- Title: Web Design Principles - Assignment 1 Code: UFIE84-20-2 Author: Daniel MacDonald - 09022238 Dated: 28 November 2010 URL: http://www.cems.uwe....on/wdp/project1 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="styleR.css" /> <script type="text/javascript" src="includes/lightbox.js"></script> <script type="text/javascript" src="includes/crumb.js"></script> <title>Home Page</title> </head> <body> <div id="wrapper"> <div id="header"> </div> <div id="menu"> <ul> <li><a href="#">Home<br /></a></li> <li><a href="about.html">About FFXIII<br /></a></li> <li><a href="form.html">Contact Form<br /></a></li> <li><a href="contact.html">Contact Details<br /></a></li> <li><a href="layout.html">Layout<br /></a></li> </ul> </div> <div id="content"> <div id="leftColumn"> <script type="text/javascript"> <!-- breadcrumbs(); --> </script> <br /><br /><br /> <!-- Script courtesy of http://twitter.com --> <script type="text/javascript" src="http://widgets.twimg.com/j/2/widget.js"></script> <script type="text/javascript"> new TWTR.Widget({ version: 2, type: 'search', search: 'final fantasy xiii', interval: 6000, title: 'News relating to...', subject: 'Final Fantasy XIII', width: '220', height: '500', theme: { shell: { background: '#bdcce9', color: '#ffffff' }, tweets: { background: '#ffffff', color: '#444444', links: '#1985b5' } }, features: { scrollbar: true, loop: true, live: false, hashtags: true, timestamp: true, avatars: true, toptweets: true, behavior: 'default' } }).render().start(); </script> </div> <div id="rightColumn"> <p>Final Fantasy XIII was officially released on the 9th March 2010 and sold 1,321,000 copies in the first 24 hours in the UK & US. Bringing the total number of sales for the complete Final Fantasy series to 7.5 million copies worldwide since the first Final Fantasy in December 1987.</p> <div><br /></div> <div id="leftImageColumn"> <div><a class="thumbnail" href="images/lightbox/ff_01_main.jpg" rel="lightbox"><span>The mighty steed, Sleipnir...</span><img src="images/lightbox/ff_01_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_02_main.jpg" rel="lightbox"><span>Serah Farron fights...</span><img src="images/lightbox/ff_02_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_03_main.jpg" rel="lightbox"><span>Flan. Not just for desert...</span><img src="images/lightbox/ff_03_thumb.jpg" alt="FFXIII" /></a><br /> </div> </div> <div id="centerImageColumn"> <div><a class="thumbnail" href="images/lightbox/ff_04_main.jpg" rel="lightbox"><span>The armoured vehicle Brynhildr...</span><img src="images/lightbox/ff_04_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_05_main.jpg" rel="lightbox"><span>In mid fight...</span><img src="images/lightbox/ff_05_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_06_main.jpg" rel="lightbox"><span>Thundara - lightening strikes...!</span><img src="images/lightbox/ff_06_thumb.jpg" alt="FFXIII" /></a><br /> </div> </div> <div id="rightImageColumn"> <div><a class="thumbnail" href="images/lightbox/ff_07_main.jpg" rel="lightbox"><span>Snow & Lightning - ready to fight...</span><img src="images/lightbox/ff_07_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_08_main.jpg" rel="lightbox"><span>Snow finds the power...</span><img src="images/lightbox/ff_08_thumb.jpg" alt="FFXIII" /></a><br /> <a class="thumbnail" href="images/lightbox/ff_09_main.jpg" rel="lightbox"><span>Cid Raines - 'The Cavelry'...</span><img src="images/lightbox/ff_09_thumb.jpg" alt="FFXIII" /></a> </div> </div> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p>Final Fantasy XIII is set within the world of Pulse. Central to the story is Cocoon, an artificial sphere that floats above Pulse's surface and is ruled by the Sanctum, a theocratic government. The worlds are controlled by fal'Cie (, mechanical beings with godlike power, each based around a crystal and created by a god-like figure called the Maker. The Cocoon fal'Cie are additionally responsible for keeping Cocoon floating, as well as providing light and water.</p> <p>Each fal'Cie handles a specific task. The fal'Cie have the capability of marking the humans, also created by the Maker, that live in Pulse and Cocoon as their servants. These servants, called l'Cie, are branded with a symbol representing either Pulse or Cocoon, and are additionally given a "Focus", a task to complete. If the l'Cie complete their task in time, they are transformed to crystal and gain eternal life (as said in the legend); otherwise they become mindless monsters called Cie'th. Five hundred years before the events of the game, two l'Cie named Oerba Dia Vanille and Oerba Yun Fang initiated a conflict that would later be known as the War of Transgression. This quarrel grew to catastrophic proportions, causing a war between Cocoon and Pulse, and ripped a large hole in Cocoon in the process.</p> <p> </p> </div> </div> <div id="footer"> 2010 - 09022238 - Daniel MacDonald </div> </div> </body> </html> CSS /* ---------------------------------------------------------------------------- Web Design Principles - Assignment 1 Daniel MacDonald - 09022238 09 December 2010 ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- Divs have been indented to show parent/child structure within the overall design --------------------------------------------------------------------------*/ body { font: bold 14px arial, san-serif; margin: 0px auto 0px auto; background-image: url('../images/ff_xii_background.png'); background-repeat: no-repeat; background-attachment: fixed; background-position: center; } /* Create equal margin around images ----------------------------------*/ img { margin: 3.5% 3.5% 3.5% 3.5%; border-color: #303030; } /* ---------------------------------------------------------------------------- Tooltip code courtesy of http://www.dynamicdrive.com/style/ --------------------------------------------------------------------------*/ .thumbnail { position: relative; z-index: 0; } .thumbnail:hover { background-color: transparent; z-index: 50; } .thumbnail span { position: absolute; background-color: #bdcce9; padding: 5px; left: -1000px; border: 1px solid #8494b4; visibility: hidden; color: white; text-decoration: none; width: 160px; \width: 170px; } .thumbnail span img { border-width: 0; padding: 2px; } .thumbnail:hover span { visibility: visible; top: -90px; left: 7px; } #wrapper { width: 75%; min-width: 900px; margin-left: auto; margin-right: auto; height: 920px; } #header { height: 98px; background: center; background-image: url('../images/ff_xii_header.png'); background-repeat: no-repeat; } #footer { float: left; padding: 10px 0 10px 0; width: 100%; background: #303030; color: #fff; line-height: 0.8em; text-align: center; } /* Start of menu -------------------------------------------------------------*/ #menu { height: 10px; background: #303030; color: #fff; margin: 0px; padding: 10px; } #menu ul { margin: 0px; padding: 0px; } #menu ul li { display: block; padding: 0px; float: left; text-align: left; margin-right: 2em; } #menu li a { color: #fff; text-decoration: none; line-height: 0.8em; display: block; } #menu li a:hover { color: #8181b7; } /* End of menu ---------------------------------------------------------------*/ #content { background: #fff; float: left; font: 14px verdana, arial; color: #000; width: 100%; } #leftColumn { float: left; width: 200px; \width: 240px; font: 10px verdana, arial; } #rightColumn { margin: 0 0 0 200px; padding: 20px; width: auto; text-align: left; } #leftImageColumn { width: 32%; float: left; } #centerImageColumn { width: 32%; float: left; } #rightImageColumn { width: 32%; float: left; } .vcard, .form { padding: 0.5em; background: #ccc; border: 1px solid black; margin: 5em 2em 0 2em; font-size: 90%; } .textDiv { text-align: left; float: left; min-width: 0px; } /* Start of lightbox ---------------------------------------------------------*/ #lightbox { background-color: #eee; padding: 10px; border-bottom: 2px solid #666; border-right: 2px solid #666; } #lightboxDetails { font-size: 0.8em; padding-top: 0.4em; } #lightboxCaption { float: left; } #keyboardMsg { float: right; } #closeButton { top: 5px; right: 5px; } #lightbox img { border: none; clear: both; } #overlay img { border: none; } #overlay { background-image: url('images/overlay.png'); } * html #overlay { background-color: #333; background-color: transparent; background-image: url('blank.gif'); filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="overlay.png", sizingMethod="scale"); } img { } /* End of lightbox -----------------------------------------------------------*/
December 5, 201015 yr right I think that I have fixed it and I'm just going to go through what I have changed rather than just paste the css file as that way you can see where I think you went wrong First body { font: bold 14px arial, san-serif; background-image: url('../images/ff_xii_background.png'); background-repeat: no-repeat; background-attachment: fixed; background-position: center; margin:0; padding:0; } took out margin:0 auto from the body and replaced with margin and padding 0 so that other parts of the code will work. Second #wrapper { width: 75%; min-width: 900px; margin:0 auto; } added the margin:0 auto into the wrapper so that the site is still central Third: #leftColumn { float:left; width:240px; padding:10px; text-align:center; } Changed the left code so that the size is correct. Fourth #rightColumn { margin-left:260px; } #rightColumn p { padding: 0px 10px 0 0px; text-align: left; } changed the right column so that it will float correctly next to the left column and then added the #rightColumn p under it which will change who the paragraph element is displayed. You had accidentally set the '#rightColumn p' with the styling for the #rightColumn as well as the paragraph Fifth .imageBox { text-align: center; padding-bottom:10px; } added some padding at the bottom of the box so that the text isn't going to be pushed up against it. When these changes are done to your css then it should fix everything, I have tested it in firefox, chrome and IE, and other than a couple of spacing issues between the paragraphs it worked for me.
December 5, 201015 yr Author I have just suddenly realised why I am having problems with the layout and you two aren't. I have been testing this in IE7 But it does work perfectly in IE8 Unfortunately for me, I have to design it so it matches the layout between FF and IE7 (something to do with making sure we understand the IE bugs due to there still being such a high percentage of people that still use it - personally, after this assignment I shall be boycotting IE7 and lower and getting everyone either to upgrade or onto FF!)
December 5, 201015 yr Your right I tested it in IE8, but just tested in IE7 and IE6 and with my changes to the css it looks the same as it does in IE8. margins and paddings are a little off compared to ff, but that can be amended with some styling as all I did was the base structure to get everything sitting correctly and your text not being in the box.
December 5, 201015 yr Author I have used the changes you have suggested, but I still get the bottom paragraph sitting on the right-hand side of the images. Could it be the resolution of my monitor being too large? Currently running at 1920x1080. I have uploaded it to the university servers if you want to see it in action: http://www.cems.uwe.ac.uk/~djmacdon/wdp/project1/
December 5, 201015 yr Hi Think Dizi and I have enjoyed looking at this. New amalgam now. Unfortunately I cannot access the university link above. How does this look in your IE Browser http://www.ricrod.com/Fox/Final.html Does it look like this
December 5, 201015 yr I can't either, my suggestion is clear your cache and make sure that your not still viewing the old css file. If that doesn't work you could force the width of the image box like this: .imageBox { text-align: center; padding-bottom:10px; width:100%; position:relative; overflow:visible; }
December 5, 201015 yr Author Obviously nothing on their servers is allowed to be viewed outside of the campus. Makes sense now why everyone on my course keeps coming in on their days off. hehe. Anyhoo, Ricrod, the link is exactly how I want it! Currently mine starts the paragraph on the right of the images, level with the top one. Dizi, I tried that code too (and cleared the cache) but it didn't make any difference to the layout.
December 5, 201015 yr I'm out of ideas as to why it works for me and not for you Well other than me recoding your site, which wouldn't really help you learn. The reason why ricrod works is it uses a lot of empty paragraph tags to shift the text down away from the images.
December 5, 201015 yr Author Well, if anything is going to go wrong, it's gonna go wrong for me. Thank you both very much for your help. Really appreciate it. Just hope I can get my head around it eventually. Looks like no relaxing over xmas for me.
Create an account or sign in to comment