1° codice HTML

garnak.olegovitc1
Salve a tutti,
non sono un conoscitore del codice HTML, per ho il seguente programma scritto in codice HTML:
<!DOCTYPE html>

<html>

<head>
	<meta charset="utf-8">
    <meta name="Description" content="Basic Gray">
	<title>Basic Gray Theme - Home</title>
    <link rel="stylesheet" href="stylesheets/default.css">
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="javascripts/behavior.js"></script>
    <!--[if IE]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>

<body>
	<header id="mast">
    	<h1>xxxxxxxxxx</h1>
    </header>
    <nav id="global">
    	<ul>
        	<li><a class="selected" href="index.html">Home</a></li>
            <li><a href="about.html">About</a></li>
            <li><a href="services.html">Services</a></li>
            <li><a href="contact.html">Contact</a></li>
        </ul>
    </nav>
    <section id="intro">
    	<header>
    		<h2> HTML 5 </h2>
        </header>
        <p>Lorem </p>
        <div id="photo">
        	<div>
            	<h3>Photo</h3>
            </div>
        </div>
    </section>
    <div id="main" class="clear">   
	</div>
    <footer>
    	<div class="clear">        
		</div>
    </footer>
</body>
</html>


che visualizza la seguente:



mi domandavo come posso spostare "Photo" a sinistra piuttosto che a destra?
Cordiali saluti

Risposte
retrocomputer
Forse dovresti postare anche il foglio di stile.

garnak.olegovitc1
Salve retrocomputer,

"retrocomputer":
Forse dovresti postare anche il foglio di stile.


non so se è giusto:




html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	font-size: 100%;
	vertical-align: baseline;
	background: transparent;
}

body {
	line-height: 1;
}

ol, ul {
	list-style: none;
}

blockquote, q {
	quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}

/* remember to define focus styles! */
:focus {
	outline: 0;
}

/* remember to highlight inserts somehow! */
ins {
	text-decoration: none;
}

del {
	text-decoration: line-through;
}

/* tables still need 'cellspacing="0"' in the markup */
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* Reset for HTML 5 Elements
----------------------------------------------------------------------------------------------------*/

/* tells browsers that don't read html 5 tags to render like divs */
header, footer, aside, nav, article, section {
	display: block;
	margin: 0;
	padding: 0;
}

/* clears containers with floated elements, no need for extra markup! */
.clear:after {
    content: ".";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;
}

/* Layout
----------------------------------------------------------------------------------------------------*/

body {
	background: #f0f0f0;
	border: none;
	color: #333;
	margin: 0 auto;
	font: 14px/24px Helvetica, Arial, sans-serif;
	width: 960px;
}

h1 {
	font: normal bold 34px/50px Arial, Helvetica, sans-serif;
	padding-top: 30px;
}

h2 {
	font-size: 28px;
	line-height: 44px;
	padding: 22px 0;
}

h3 {
	font-size: 18px;
	line-height: 22px;
	padding: 11px 0;
}

p {
	font-weight: normal;
	padding-bottom: 22px;
}

a {
	color: #CC6600;
	text-decoration: none;
}

a:visited {
	color: #CC6600;
	outline: none;
	text-decoration: none;
}

a:hover {
	color: #FF9900;
	text-decoration: underline;
}

a:active {
	color: #CC6600;
	outline: none;
	text-decoration: none;
}

a:focus {
	outline: 1px dotted;
}

#mast h1 {
	padding: 30px 0 20px 40px;
}

nav#global {
	padding: 10px 0;
	position: absolute;
	left: 0;
	width: 100%;
	background-color: #333;
}

nav#global ul {
	margin: 0 auto;
	width: 960px;
	border: none;
}

nav#global ul li {
	display: inline;
	list-style: none;
	padding-left: 40px;
}

nav#global ul li a {
	color: #777;
	background-color: #222;
	border: 2px solid #222;
	font: normal bold 14px/44px Arial, Helvetica, sans-serif;
	padding: 10px;
	margin-right: 40px;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	text-align: center;
}

nav#global ul li a:hover, nav#global ul li a:focus {
	background-color: #111;
	border: 2px solid #444;
	color: #FF9900;
	text-decoration: none;
}

nav#global ul li a.selected {
	color: #fff;
}

nav#global ul li a.selected:hover {
	color: #FF9900;
}

#intro {
	background-color: #ccc;
	margin-top: 100px;
	padding: 40px;
	-moz-border-radius: 15px;
	-webkit-border-radius: 15px;
}

#intro header h2 {
	font-weight: normal;
	line-height: 30px;
	padding: 0 0 15px 0;
	width: 370px;
}

#intro p {
 	width: 370px;
}

#intro a {
	color: #fff;
	background-color: #333;
	font: normal bold 14px/44px Arial, Helvetica, sans-serif;
	padding: 10px;
	margin-right: 40px;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	text-align: center;
}

#intro a:hover {
	color: #FF9900;
	background-color: #222;
	text-decoration: none;
}

#intro #photo {
	background-color: #fff;
	float: right;
	margin-top: -170px;
	-moz-box-shadow: 0 1px 10px #333;
	-webkit-box-shadow: 0  1px 10px #333;
	-moz-border-radius: 4px;
	-webkit-border-radius: 4px;
	width: 400px;
	height: 300px;
}

#photo div {
	background-color: #333;
	margin: 10px auto 0 auto;
	-moz-border-radius: 2px;
	-webkit-border-radius: 2px;
	width: 380px;
	height: 260px;
	text-align: center;
}

#photo div h3 {
	color: #fff;
	font-size: 25px;
	line-height: 25px;
	padding: 115px 0 0 0;
}

div#main {
	background: url(../images/main_bkgd.png) repeat-y top right;
	border: none;
}

#main #articles {
	float: left;
	margin-left: 40px;
	width: 600px;
	border: none;
}

article {
	border-bottom: 1px dotted #aaa;
	padding: 15px 0;
}

article:last-child {
	border-bottom: none;
}

aside {
	float: right;
	margin-top: 40px;
	margin-right: 40px;
}

aside section {
	background-color: #F5F5F5;
	margin-bottom: 30px;
	padding: 20px 40px 20px 20px;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
}

aside h3 {
	padding: 0 0 11px 0;
}

nav#categories ul li, nav#archives ul li {
	list-style: none;
	margin: 5px 0;
}

footer {
	position: absolute;
	left: 0;
	width: 100%;
	background-color: #333;
}

footer div {
	margin: 0 auto;
	padding: 40px 0 20px 40px;
	width: 920px;
	border: none;
}

footer div section {
	color: #777;
	float: left;
	margin-right: 25px;
	width: 230px;
	border: none;
}

footer div section h3 {
	color: #fff;
}

nav#blogRoll ul li, nav#siteMap ul li {
	color: #777;
	list-style: disc;
	margin-left: 15px;
}

footer #about {
	margin-right: 60px;
	width: 330px;
}


Cordiali saluti

retrocomputer
"garnak.olegovitc":

#intro #photo {
	background-color: #fff;
	float: right;



Sostituendo "right" con "left", sposti lo spazio che contiene Photo. Poi però immagino che tu voglia mettere a destra ciò che era a sinistra... :-D
Oppure volevi spostare solo la scritta Photo?

garnak.olegovitc1
Salve retrocomputer,

"retrocomputer":

Poi però immagino che tu voglia mettere a destra ciò che era a sinistra... :-D


bhè si.
Cordiali saluti

Rispondi
Per rispondere a questa discussione devi prima effettuare il login.