PDA

View Full Version : Trying to make my head height smaller



conphill
Mar 23rd, 2011, 09:25 PM
I am having trouble making the large gray header at the top of my page smaller. I have tried adjusting my CSS but it doesn't change the size.

HTML


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CampusTaps.com</title>
<link rel="stylesheet" href="homepageimage.css" type="text/css" />
<script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript"
src="http://campustapscom.ipage.com/jquery.flow.1.2.auto.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#myController").jFlow({
slides: "#slides",
controller: ".jFlowControl", // must be class, use . sign
slideWrapper : "#jFlowSlide", // must be id, use # sign
selectedWrapper: "jFlowSelected", // just pure text, no sign
auto: true, //auto change slide, default true
width: "610px",
height: "235px",
duration: 400,
prev: ".jFlowPrev", // must be class, use . sign
next: ".jFlowNext" // must be class, use . sign
});
});
</script>

<!--CONTENT SLIDER-->

</head>
<body>
<!--CONTAINER STARTS-->
<div id="container">
<!--HEADER/NAVIGATION STARTS-->

<div id="top">
<!--WEBSITE TITLE STARTS-->
<div id="title">
<h1><a href="#####" title="C">SS</a></h1>
</div>
<!--WEBSITE TITLE ENDS-->
<!--NAVIGATION STARTS-->
<div id="nav">
<ul class="nav-links">
<li><a href="#####" title="Home">Home</a></li>
<li><a href="#####" title="L P">LP</a></li>
<li><a href="######" title="CBar">C B</a></li>
<li class="borderx2"><a href="#####" title="Contact">Contact</a></li>
</ul>
</div>

<!--NAVIGATION ENDS-->
</div>
<!--HEADER/NAVIGATION ENDS-->
<div id="container2"> <img src="http://campustapscom.ipage.com/Images/campuscity.jpg" id="city" alt="" />
<div id="main" style="opacity:0.9;filter:alpha(opacity=90)">



<!--FOOTER ENDS-->
</div>
</div>
</div>
<!--CONTAINER ENDS-->
</body>
</html>

CSS


* {
margin: 0px;
padding: 0px;
border: none;
}
body {
background-image: url(http://campustapscom.ipage.com/Images/Background.jpg);
background-repeat: repeat-x;
background-color: #ffffff;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #c8c8c8;
}
#container {
height:100%;
}
#top {
width: 850px;
height: 119px;
margin:auto;
}
#title {
float: left;
width: 278px;
height: 74px;
padding-top: 45px;
}
#title h1 {
display: block;
float: left;
width: 278px;
height: 74px;
text-indent: -9999px;
}
#title h1 a {
display: block;
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-position: 0 0;
}
#navigation {
float: right;
}
.nav-links li {
display: block;
float: left;
list-style-type: none;
}
.nav-links li a {
float: left;
width: 120px;
height: 68px;
text-decoration: none;
text-transform: capitalize;
color: #666666;
font-size: 12px;
text-align: center;
padding-top: 51px;
border-left-width: 1px;
border-left-style: solid;
border-left-color: #cecece;
}
.nav-links li a:hover {
color: #ffffff;
background-position: center bottom;
}
li.borderx2 {
border-right-width: 1px;
border-right-style: solid;
border-right-color: #cecece;
}
.separator {
background-image: url(http://campustapscom.ipage.com/Images/separator.jpg);
background-repeat: no-repeat;
float: left;
height: 6px;
width: 960px;
margin-top: 20px;
margin-bottom: 20px;
}
.bx-pager a {
text-indent: -999999px;
}
h2 {
text-transform: uppercase;
color: #ffffff;
font-size: 16px;
margin-bottom: 15px;
}
.separator {
background-image: url(http://campustapscom.ipage.com/Images/divider.jpg);
background-repeat: no-repeat;
float: left;
height: 6px;
width: 960px;
margin-top: 20px;
margin-bottom: 20px;
}
#sidebar {
float: left;
height: 209px;
width: 219px;
background-image: url(http://campustapscom.ipage.com/Images/Updatesbox.gif);
background-repeat: no-repeat;
padding-top: 20px;
padding-right: 20px;
padding-bottom: 30px;
padding-left: 20px;
}
h3 {
text-transform: uppercase;
color: #ffffff;
text-align: center;
margin-bottom: 20px;
font-size: 12px;
}
.sidebar-list li {
list-style-type: none;
color: #2C5923;
margin-top: 10px;
padding-bottom: 10px;
background-image: url(http://campustapscom.ipage.com/Images/divider.png);
background-repeat: repeat-x;
background-position: bottom;
}
#content {
float: right;
width: 560px;
height: 300px;
color:#2C5923;
background-image:url(http://campustapscom.ipage.com/Images/picscontent2.gif);
background-repeat: no-repeat;
padding-top:15px;
padding-left:20px;
}
#content p {
margin-bottom: 15px;
text-align: center;
}
#footer {
text-align: center;
color:#FFF;
clear:both;
padding-top:30px;/*height: 20px;
clear: both;
margin-top: 10px;
padding-top: 25px;

color: #ffffff;
background-image:url(http://campustapscom.ipage.com/Images/Body-bg.jpg);
position:relative;
z-index:1;*/
}
#jFlowSlide {
background:#7A7A7A;
font-family: Georgia;
margin:auto;
}
#myController {
font-family: Georgia;
padding:2px 0;
width:610px;
background:#333333;
margin:auto;
}
#myController span.jFlowSelected {
background:#43A0D5;
margin-right:0px;
}
.slide-wrapper {
padding: 5px;
}
.slide-thumbnail {
width:300px;
float:left;
}
.slide-thumbnail img {
max-width:300px;
}
.slide-details {
width:290px;
float:right;
margin-left:10px;
}
.slide-details h2 {
font-size:1.5em;
font-style: italic;
font-weight:normal;
line-height: 1;
margin:0;
}
.slide-details .description {
margin-top:10px;
}
.jFlowControl, .jFlowPrev, .jFlowNext {
color:#FFF;
cursor:pointer;
padding-left:5px;
padding-right:5px;
padding-top:2px;
padding-bottom:2px;
}
.jFlowControl:hover, .jFlowPrev:hover, .jFlowNext:hover {
background: #43A0D5;
}
.jflow-content-slider {
clear:left;
padding-top:40px;
width:700px;
margin:auto;
}


#gallery {
position:absolute;
margin-left:279px;
margin-top:148px;
vertical-align: top;
width: 100px;
height: 100px;
}

#container2 {
position:relative;
}
#city {
width:100%;
height:750px;
position:absolute;
top:0;
left:0;
z-index:0;
}
#main {
background:url(http://campustapscom.ipage.com/Images/mainpage1.png) no-repeat;
clear:both;
width:850px;
margin:auto;
height:729px;
position:relative;
z-index:1;
}
#updates {
width:275px;
padding:5px;
height:190px;
float:left;
margin-left:38px;
margin-top:150px;
overflow:auto;
}
#updates ul {
padding-left:20px;
list-style:disc;
}

Excavator
Mar 23rd, 2011, 11:49 PM
Hello conphill,
If you do away with the height on #top (that is your header, isn't it?) and clear the floats like this -


#top {
width: 850px;
/*height: 119px;*/
overflow: auto;
margin:auto;
}

Now the content of #top will control the height of it.
You can adjust that height by changing the height and/or padding on #title and .nav-links li a

conphill
Mar 25th, 2011, 03:12 AM
Hello conphill,
If you do away with the height on #top (that is your header, isn't it?) and clear the floats like this -


#top {
width: 850px;
/*height: 119px;*/
overflow: auto;
margin:auto;
}

Now the content of #top will control the height of it.
You can adjust that height by changing the height and/or padding on #title and .nav-links li a

I made the changes but nothing seems to change

Ahlahn
Mar 25th, 2011, 03:32 AM
Try max-height: ??px;

Excavator
Mar 25th, 2011, 03:38 AM
I made the changes but nothing seems to change

Post your updated code so we can know what height and margin you put on #title and .nav-links li a.

conphill
Mar 28th, 2011, 02:06 AM
Post your updated code so we can know what height and margin you put on #title and .nav-links li a.


* {
margin: 0px;
padding: 0px;
border: none;
}
body {
background-image: url(http://campustapscom.ipage.com/Images/Background.jpg);
background-repeat: repeat-x;
background-color: #ffffff;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #c8c8c8;
}
#container {
height:100%;
}
#top {
width: 850px;
height: 119px;
margin:auto;
}
#title {
float: left;
width: 278px;
height: 74px;
padding-top: 45px;
}
#title h1 {
display: block;
float: left;
width: 278px;
height: 74px;
text-indent: -9999px;
}
#title h1 a {
display: block;
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-position: 0 0;
}
#navigation {
float: right;
}
.nav-links li {
display: block;
float: left;
list-style-type: none;
}
.nav-links li a {
float: left;
width: 120px;
height: 68px;
text-decoration: none;
text-transform: capitalize;
color: #666666;
font-size: 12px;
text-align: center;
padding-top: 51px;
border-left-width: 1px;
border-left-style: solid;
border-left-color: #cecece;
}
.nav-links li a:hover {
color: #ffffff;
background-position: center bottom;
}
li.borderx2 {
border-right-width: 1px;
border-right-style: solid;
border-right-color: #cecece;
}
.separator {
background-image: url(http://campustapscom.ipage.com/Images/separator.jpg);
background-repeat: no-repeat;
float: left;
height: 6px;
width: 960px;
margin-top: 20px;
margin-bottom: 20px;
}
.bx-pager a {
text-indent: -999999px;
}
h2 {
text-transform: uppercase;
color: #ffffff;
font-size: 16px;
margin-bottom: 15px;
}
.separator {
background-image: url(http://campustapscom.ipage.com/Images/divider.jpg);
background-repeat: no-repeat;
float: left;
height: 6px;
width: 960px;
margin-top: 20px;
margin-bottom: 20px;
}
#sidebar {
float: left;
height: 209px;
width: 219px;
background-image: url(http://campustapscom.ipage.com/Images/Updatesbox.gif);
background-repeat: no-repeat;
padding-top: 20px;
padding-right: 20px;
padding-bottom: 30px;
padding-left: 20px;
}
h3 {
text-transform: uppercase;
color: #ffffff;
text-align: center;
margin-bottom: 20px;
font-size: 12px;
}
.sidebar-list li {
list-style-type: none;
color: #2C5923;
margin-top: 10px;
padding-bottom: 10px;
background-image: url(http://campustapscom.ipage.com/Images/divider.png);
background-repeat: repeat-x;
background-position: bottom;
}
#content {
float: right;
width: 560px;
height: 300px;
color:#2C5923;
background-image:url(http://campustapscom.ipage.com/Images/picscontent2.gif);
background-repeat: no-repeat;
padding-top:15px;
padding-left:20px;
}
#content p {
margin-bottom: 15px;
text-align: center;
}
#footer {
text-align: center;
color:#FFF;
clear:both;
padding-top:30px;/*height: 20px;
clear: both;
margin-top: 10px;
padding-top: 25px;

color: #ffffff;
background-image:url(http://campustapscom.ipage.com/Images/Body-bg.jpg);
position:relative;
z-index:1;*/
}
#jFlowSlide {
background:#7A7A7A;
font-family: Georgia;
margin:auto;
}
#myController {
font-family: Georgia;
padding:2px 0;
width:610px;
background:#333333;
margin:auto;
}
#myController span.jFlowSelected {
background:#43A0D5;
margin-right:0px;
}
.slide-wrapper {
padding: 5px;
}
.slide-thumbnail {
width:300px;
float:left;
}
.slide-thumbnail img {
max-width:300px;
}
.slide-details {
width:290px;
float:right;
margin-left:10px;
}
.slide-details h2 {
font-size:1.5em;
font-style: italic;
font-weight:normal;
line-height: 1;
margin:0;
}
.slide-details .description {
margin-top:10px;
}
.jFlowControl, .jFlowPrev, .jFlowNext {
color:#FFF;
cursor:pointer;
padding-left:5px;
padding-right:5px;
padding-top:2px;
padding-bottom:2px;
}
.jFlowControl:hover, .jFlowPrev:hover, .jFlowNext:hover {
background: #43A0D5;
}
.jflow-content-slider {
clear:left;
padding-top:40px;
width:700px;
margin:auto;
}


#gallery {
position:absolute;
margin-left:279px;
margin-top:148px;
vertical-align: top;
width: 100px;
height: 100px;
}

#container2 {
position:relative;
}
#city {
width:100%;
height:750px;
position:absolute;
top:0;
left:0;
z-index:0;
}
#main {
background:url(http://campustapscom.ipage.com/Images/mainpage1.png) no-repeat;
clear:both;
width:850px;
margin:auto;
height:729px;
position:relative;
z-index:1;
}
#updates {
width:275px;
padding:5px;
height:190px;
float:left;
margin-left:38px;
margin-top:150px;
overflow:auto;
}
#updates ul {
padding-left:20px;
list-style:disc;
}

Excavator
Mar 28th, 2011, 03:18 AM
Like I said in http://www.codingforums.com/showpost.php?p=1069370&postcount=2

Now the content of #top will control the height of it.
You can adjust that height by changing the height and/or padding on #title and .nav-links li a


#top {
width: 850px;
/*height: 119px;*/
overflow: auto;[/COLOR]
margin:auto;
}
#title {
float: left;
width: 278px;
height: 74px;
/*padding-top: 45px;*/
}
.nav-links li a {
float: left;
width: 120px;
line-height: 74px;
/*
height: 68px;
padding-top: 51px;
*/
text-decoration: none;
text-transform: capitalize;
color: #666666;
font-size: 12px;
text-align: center;
border-left-width: 1px;
border-left-style: solid;
border-left-color: #cecece;
}

oVTech
Mar 28th, 2011, 03:37 AM
Ha! ha! ha! ha!............ I'm sorry, but the title of this thread is way too funny for me: "Trying to make my head height smaller"

You really made my day! :thumbsup: