PHP Basics: Embedding PHP inside HTML
Tuesday, January 26th, 2010
Embed PHP code inside html to add some dynamic functionality to your pages.
Duration : 0:5:1
Embed PHP code inside html to add some dynamic functionality to your pages.
Duration : 0:5:1
If I correctly interpret your question to mean "line up horizontally"…
save this as horizList.css – - – -
ul.linedUp {
/* optional to make it only thing on "line" */
clear: both;
/* no bullets – no vertical "stacking" */
list-style: none outside;
}
ul.linedUp li {
/* optional border to show where the li is */
border: .125em solid blue;
/* these do the horizontal "stacking" */
display: block;
float: left;
/* options to make it "prettier" */
margin: .25em;
padding: .25em;
text-align: center;
width: 8em;
}
save this as horizList.html – - – -
<html>
<head>
<link rel = "stylesheet" href = "horizList.css" type = "text/css" />
</head>
<body>
<ul class = "linedUp">
<li>list item 0</li>
<li>list item 1</li>
<li>list item 2</li>
<li>list item 3</li>
</ul>
</body>
</html>
Note that I couldn’t properly declare an Xhtml doctype, since Y!A would truncate the URL attributes. The correct specification would be like the following without the blanks that are embedded in the URLs:
<?xml version = "1.0" encoding = "UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// www.w3.org/ TR/xhtml1/ DTD/ xhtml1 – strict.dtd">
<html lang="en" xml:lang="en" xmlns="http:// www.w3.org/ 1999/ xhtml">
From my series in Beginning HTML and Xhtml is my first installment of “HTML Tips & Tricks”. I begin with using CSS to create Navigation-style Buttons.
Duration : 0:9:46