Forum Moderators: not2easy
First and foremost, I would like to thank the heavens for your existence. Now down to brass tacks. Using your experience
template, and not knowing much about CSS, I am having a problem placing my website motto under my domain name where it would save space &
look better. My motto is currently under, but to the right of my domain name. Here is the source code for the index page and .css page. Please
help, I have been reviewing your site and already know you are great, however, I will loudly proclaim it, if you would help me with this
small issue (for you). Thank you so much.
Yours, GLB
/////////////////////////////////////////
mywebsite.com
..............my motto is here.
////////////////////////////////////////
<----desired effect---->
Mywebsite.com
.....my motto.
/////////////////////////////////////////////////////////
<----- Index.htm ----->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Released for free under a Creative Commons Attribution 2.5 License
Name : Design
Description: A three-column, fixed-width design with fluid header and footer.
Version : 1.0
Released : 20071009
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Style - www.mywebsite.com.com</title>
<meta name="keywords" content="Blog" />
<meta name="description" content="Blog" />
<link href="default.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<!-- start header -->
<div id="header">
<div id="logo">
<h1><a href="#">mywebsite.com</a></h1><br />
<p><i>My motto here.</i></p>
</div>
<div id="menu">
Etc…
Etc…
//////////////////////////////////////////////////////////////////////////////////////////////////////////
<----- default.css ----->
body {
margin: 0;
padding: 0;
background: #0F5B96 url(images/img01.gif) repeat-x;
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
color: #A4E4F5;
}
input, textarea {
background: #A4E4F5;
border: 1px solid #FFFFFF;
font: bold 13px Arial, Helvetica, sans-serif;
color: #0F5B96;
}
h1, h2, h3, p, ol, ul {
margin-top: 0;
}
h1, h2, h3 {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
h1, h2 {
text-transform: lowercase;
font-weight: normal;
}
h1 {
letter-spacing: -2px;
font-size: 2.4em;
}
h2 {
letter-spacing: -1px;
font-size: 1.8em;
}
p, ol, ul {
margin-bottom: 1.5em;
line-height: 150%;
}
a {
color: #A4E4F5;
}
a:hover {
text-decoration: none;
color: #FFFFFF;
}
img.left {
float: left;
margin: 4px 20px 0 0;
}
img.right {
float: left;
margin: 4px 0 0 20px;
}
hr {
display: none;
}
/* Header */
#header {
height: 150px;
background: url(images/img02.jpg) no-repeat center top;
text-transform: lowercase;
}
#logo {
float: left;
}
#logo h1, #logo p {
float: left;
margin: 0;
line-height: normal;
}
#logo h1 {
padding: 47px 0 0 20px;
font-size: 3em;
color: #62D6F5;
}
#logo p {
padding: 69px 0 0 4px;
letter-spacing: -1px;
font-size: 1.4em;
color: #199DD2;
}
#logo a {
text-decoration: none;
color: #62D6F5;
}
#menu {
float: right;
}
#menu ul {
margin: 0;
padding: 60px 20px 0 0;
list-style: none;
}
#menu li {
display: inline;
}
#menu a {
float: left;
width: 120px;
height: 56px;
margin: 0 0 0 2px;
padding: 9px 0 0 0;
background: #1B97CE url(images/img03.gif) no-repeat;
text-decoration: none;
text-align: center;
letter-spacing: -1px;
font-size: 1.1em;
font-weight: bold;
color: #000000;
}
#menu a:hover, #menu .current_page_item a {
background: #26BADF url(images/img04.gif) no-repeat;
}
Etc…
Etc…
Welcome to WebmasterWorld Forum.
I am not entirely sure why you are using float:left in your header.
From your message I assume that your header is the full width of you container/site and that you only have the wwwaddress.com and the motto in your header.
How about something like
>>HTML
<div id="header">
<h1>Mywebsite.com</h1>
<span class="motto">my motto is here</span>
</div>
>>CSS
#header { }
#header h1 { margin: 20px 0 10px 10px; }
#header span.motto { padding: 10px 0 0 30px; }
You can adjust the margin and padding settings to aling the site.
The margin and padding settings work in the following way:
e.g.
margin: (top value) (right value) (bottom value) (left value)
#logo h1, #logo p {
float: left;
margin: 0;
line-height: normal;
clear: both;
}
&
#logo p {
padding: 4px 0 0 20px;
letter-spacing: -1px;
font-size: 1.4em;
color: #199DD2;
}
BTW you are using the strict doctype but using the <i> tag in your html, to validate this should be done in your CSS.
[edited by: Old_Honky at 11:02 am (utc) on Nov. 22, 2007]