Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-13-2009, 08:19 PM   PM User | #1
SteveH
Regular Coder

 
Join Date: Nov 2005
Posts: 615
Thanks: 91
Thanked 1 Time in 1 Post
SteveH is an unknown quantity at this point
padding issue - not sure?

Hello

I have a page with a simple logo at the top. Under that is the title of the site (also an image). Under that there is a further image.

I am having difficulty bringing the bottom two images closer together and thought it must be something to do with padding, but no matter how much I mess about with padding, it just won't do what I want it to do!

Here is the code in my HTML:

Code:
<div id="container">
	
		<div id="logo"><h1>winXP</h1></div>
		<div class="nav"><a href="http://www.halls.mmu.ac.uk">home</a></div>
				
		
		<h2 class="imagemenu">ICTS</h2>
		<p class="version"></p>
		<p class="description"></p>
		
		
		<h3 class="example">example</h3>
		<div id="example">
			<div id="imageMenu">
			<ul>
				<li class="landscapes"><a href="page1.html" onclick="Show('page1');return false">Landscapes</a></li>
				<li class="people"><a href="page2.html" onclick="Show('page2');return false">People</a></li>
				<li class="nature"><a href="page3.html" onclick="Show('page3');return false">Nature</a></li>
				<li class="urban"><a href="page4.html" onclick="Show('page4');return false">Urban</a></li>
				<li class="abstract"><a href="page5.html" onclick="Show('page5');return false">Abstract</a></li>
			</ul>
			</div>
and here is the CSS:

Code:
html, body, div, span, object, iframe,h1, h2, h3, h4, h5, h6, p, blockquote, pre,a, abbr, acronym, address, 
code,del, dfn, em, img, q, dl, dt, dd, ol, ul, li,fieldset, form, label, legend,
table, caption, tbody, tfoot, 
thead, tr, th, td

 {margin: 0;

padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;}

body { line-height: 1.5;
background: #fff;
margin:1.5em 0; } /* Tables still need 'cellspacing="0"' in the markup. */


table { border-collapse: separate; border-spacing: 0; }

caption, th, td {

text-align: left; font-weight:400; }

/* Remove possible quote marks (") from <q>, <blockquote>. */

blockquote:before, blockquote:after, q:before, q:after { content: ""; }

blockquote, q { quotes: "" ""; }
a img { border: none; }

body {color: #797979;

font-family: Verdana, Arial;
font-size: 75%;}a {

color: #607293;
text-decoration: none;}
a:hover {
color: #354158;}
#container {
width: 500px;
margin: auto;
padding-top: 10px;
padding-bottom: 30px;}


#container #logo {
background: url(../img/logo.gif) no-repeat top left;
height: 44px;
padding-bottom: 50px;
border-bottom: 1px solid #797979;
margin-bottom: 20px;}

#container
#logo h1 {
text-indent: -9999px;}
#footer {
margin-top: 20px;}

.nav {
float: right;
margin-top: -15px;}

h2 {
font-size: 2.2em;
margin: 0;
margin-bottom: 5px;
color: 6F189D;}

h3 {
font-size: 1.8em;
margin-top: 10px;
margin-bottom: 0px;
color: #607293;}

h4 {
font-weight: bold;}
.desc {
margin: -15px 0 40px 0;}
.desc p {
margin-bottom: 10px;}
.home
.menuItem h3 {
font-size: 1.8em;
line-height: 1.0em;
float: none;
position: relative;
display: block;
border-bottom: none;
margin: 0;}
.home .menuItem p {
margin-left: 0px;
margin-bottom: 0px;
position: relative;
display: block;
border-bottom: none;}
.home .menuItem {
display: block;
position: relative;
padding-bottom: 5px;
padding-top: 5px;
color: #797979;
outline: none;
cursor: pointer;
height: 40px;
border-bottom: 1px solid #797979;}
.home
.menuItem:hover {

background-color: #f1f1f1;}
.home h2 
{	color: #354158;


margin-bottom: 0px;}


.arrow {
font-size: 4em;
position: absolute;
right: 0px;
top: -16px;
color: #b9b9b9;}


.home
.menuItem:hover
.arrow {
right: -4px;}
.home h2 {
background: url(../img/mootools-plugins.gif) no-repeat top left;
width: 500px;
height: 40px;
text-indent: -9999px;}


.home
.imagemenu {	background: url(../img/nav-imagemenu.gif) no-repeat top left;
width: 500px;
height: 22px;
text-indent: -9999px;}


.home .validate {
background: url(../img/nav-validate.gif) no-repeat top left;
width: 500px;
height: 22px;
text-indent: -9999px;}


.home .lightbox {
background: url(../img/nav-lightbox.gif) no-repeat top left;
width: 500px;
height: 22px;
text-indent: -9999px;}


.home .multibox {
background: url(../img/nav-multibox.gif) no-repeat top left;
width: 500px;
height: 22px;
text-indent: -9999px;}


.home
.slideshow {
background: url(../img/nav-slideshow.gif) no-repeat top left;
width: 500px;
height: 22px;
text-indent: -9999px;}


.home
.sortabletable {
background: url(../img/nav-sortabletable.gif) no-repeat top left;
width: 500px;
height: 22px;
text-indent: -9999px;}


.home .slider {
background: url(../img/nav-slider.gif) no-repeat top left;
width: 500px;
height: 22px;
text-indent: -9999px;}


.home .roundedcorners {
background: url(../img/nav-roundedcorners.gif) no-repeat top left;
width: 500px;
height: 22px;
text-indent: -9999px;}


.home
.pageloader {
background: url(../img/nav-pageloader.gif) no-repeat top left;
width: 500px;
height: 22px;
text-indent: -9999px;}


h2.imagemenu {
background: url(../img/title-imagemenu.gif) no-repeat top left;
height: 44px;
text-indent: -9999px;}


h2.validate {
background: url(../img/title-validate.gif) no-repeat top left;
height: 30px;
text-indent: -9999px;}


h2.lightbox {
background: url(../img/title-lightbox.gif) no-repeat top left;
height: 30px;
text-indent: -9999px;}


h2.multibox {	background: url(../img/title-multibox.gif) no-repeat top left;
height: 30px;	text-indent: -9999px;}
h2.slideshow {	background: url(../img/title-slideshow.gif) no-repeat top left;
height: 30px;
text-indent: -9999px;}


h2.sortabletable {
background: url(../img/title-sortabletable.gif) no-repeat top left;
height: 30px;
text-indent: -9999px;}


h2.slider {
background: url(../img/title-slider.gif) no-repeat top left;
height: 30px;
text-indent: -9999px;}


h2.roundedcorners {
background: url(../img/title-roundedcorners.gif) no-repeat top left;
height: 30px;
text-indent: -9999px;}


h2.pageloader {
background: url(../img/title-pageloader.gif) no-repeat top left;
height: 30px;
text-indent: -9999px;}


h3.example {
background: url(../img/heading-example.gif) no-repeat top left;
height: 30px;
text-indent: -9999px;}


h3.features {
background: url(../img/heading-features.gif) no-repeat top left;
height: 30px;
text-indent: -9999px;}


h3.usage {
background: url(../img/heading-usage.gif) no-repeat top left;
height: 30px;	text-indent: -9999px;}


h3.options {
background: url(../img/heading-options.gif) no-repeat top left;
height: 30px;	text-indent: -9999px;}


h3.compatibility {
background: url(../img/heading-browser.gif) no-repeat top left;
height: 30px;	text-indent: -9999px;}


h3.requirements {
background: url(../img/heading-requirements.gif) no-repeat top left;
height: 30px;	text-indent: -9999px;}


h3.downloads {
background: url(../img/heading-downloads.gif) no-repeat top left;
height: 30px;	text-indent: -9999px;}


.version {
font-family: Courier;
font-size: 1em;}ul {
margin-left: 15px;}


dt {float: left;}

dd {	margin-left: 150px;
margin-bottom: 10px;}


.description {
margin-top: 10px;}code {font-family: Courier;}
#usage p {
margin: 10px 0px 5px 0px;}
A pointer in the right direction would be great.

Thanks.
SteveH is offline   Reply With Quote
Old 05-13-2009, 08:33 PM   PM User | #2
beedie
New Coder

 
Join Date: Mar 2008
Posts: 88
Thanks: 12
Thanked 0 Times in 0 Posts
beedie has a little shameless behaviour in the past
Try :
font-size:0; line-height:0

if that is possible in your situation.
I didn't look carefully at your code
beedie is offline   Reply With Quote
Old 05-13-2009, 08:40 PM   PM User | #3
SteveH
Regular Coder

 
Join Date: Nov 2005
Posts: 615
Thanks: 91
Thanked 1 Time in 1 Post
SteveH is an unknown quantity at this point
Hello Beedie

thanks for your post.

That didn't really do anything to pull the two bottom images together.

I think the problem lies in the h2 and h3 class, but as I say when I have messed about with those, nothing, so it must lie elsewhere. In the 'container' maybe?

Cheers
SteveH is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:12 PM.


Advertisement
Log in to turn off these ads.