TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 02-23-2009, 12:56 PM   #1 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default Anyone good with HTML + CSS?

Hi!

I'm trying to create a website layout. Right now I've just used different background colors to distinguish the different elements and the positioning of them.

Anyhow, the "problem" is:

1. I want margins between the logo and the header, but I can't seem to get any margins cause of the float: left; I've done on the logo.

2. I want the same margin between the left menu(products) and the menu-bar, and also the content.

3. This CSS doesn't seem really good, seeing as if I try to use padding on the header, cause of the h1 element, it get's pushed down really weird.

4. I tried to do the links in the menu-bar like a ul list, and I got rid of the list "dots", but they still were on different rows, how would I solve that?

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

	<head>
	
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
		<link rel="stylesheet" type="text/css" href="style.css" />
		
		<title>Eldobado</title>
		
	</head>
	
	<body>
	
		<div id="container">
			
			<div id="logo">&nbsp</div>
			
			<div id="header"><h1>Eldobado</h1></div>
			
			<div id="left-menu">Products</div>
			
			<div id="menu-bar">
				
				Link 1

			</div>
			
			<div id="content"><h1>Content</h1></div>
		
		</div>
	
	</body>
</html>
Code:
body {
	
	margin: 0;
	padding: 0;
	padding-left: 30px;	
	padding-right: 30px;

}

#container {

	background-color: #E0EEEE;
	padding: 10px;

}

#logo {

	background-color: #838B8B;
	width: 200px;
	height: 170px;
	float: left;

}

#header {

	background-color: #2F4F4F;
	height: 170px;
	text-align: center;

}

#header h1 {

	margin: 0;
	padding: 0;
	
}

#left-menu {
	
	margin-top: 10px;
	background-color: #00C78C;
	width: 200px;
	float: left;
	height: 600px;

}

#menu-bar {

	background-color: #00C957;
	margin-top: 10px;

}

#content {

	height: 570px;
	text-align: center;
	background-color: #98FB98;
	margin-top: 10px;

}

#content h1 {

	margin: 0;
	padding: 0;

}
I'm a complete newbie at CSS so any help will be appriciated!
Thanks
__________________
Tanax is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exciting Stuff in HTML 5! Wildhoney XHTML, HTML, CSS 20 02-17-2013 03:16 PM
XML only good for RSS? Orc XML, XSLT, XPath, XQuery 12 10-19-2012 10:03 AM
HTML & Wordpress Integration Wildhoney General 2 01-10-2009 08:11 PM
generating an html list Peuplarchie Absolute Beginners 1 06-23-2008 02:54 AM
Good business communication. Village Idiot The Lounge 10 01-11-2008 08:43 PM


All times are GMT. The time now is 02:41 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design