Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Having proplems sizing DIVS
Old 06-04-2005, 09:00 PM Having proplems sizing DIVS
Average Talker

Posts: 15
Trades: 0
Hello guys. I am having a problem with some menus I am trying to write in XHTML&CSS.
the dropdown menus on my page(id="dropdown" - see HTML below) are not rendering the same size as the corrasponding buttons, despite being set by the css statement ('#navbar div div { width:5em; }' - full CSS below)
HTML Code:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1-strict.dtd">

<html xml:lang="en">
	
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />	
		<meta name="description" content="This website is a work in progress..." />
		<meta name="keywords" content="Ben, Wainright, under, construction" />
		<title>Twenty something for nothing</title>
		<link rel="stylesheet" type="text/css" href="css/default.css" />
	</head>
	
	<body>
		<!-- Top menu bar-->
		<div id="navbar">
		
			<div id="buttons">
				<div><a href="">Navigation</a></div>
				<div><a href="">Profiles</a></div>
	    		<div><a href="">Links</a></div>

			</div>
			
			<div id="dropdown">
				<div>
					<div>Home</div>
					<div>Archives</div>
					<div>About</div>
					<div>Contact</div>
				</div>
				<div>
					<div>Gaydar</div>
					<div>Faceparty</div>
					<div>Outpages</div>
				</div>
				<div>
					<div>Gaydar.co.uk</div>
					<div>GayYouthUk</div>
					<div>Gay.Com</div>
				</div>
				
			</div>
			
		</div>

		
		<div id="main">
			<h1>Twentysomething For Nothing</h1>
			<p id="pageDetails">Site written by Ben Wainwright in 2005 with strict <abbr title="eXtensible HyperText Markup Language">XHTML</abbr> 1.0. Click <a href="http://validator.w3.org/check?uri=referer">here</a> to validate code.</p>		
		</div>		
		<script type="text/javascript" src="javascript/global.js"></script>
	</body>

</html>
Code:
@import url(global.css);

/*	Individual Formatting                  */
/*		 -  Formatting the main content    */

#main
{
	position:absolute;
	width:100%;
	left:0;
	z-index:0;
}

#pageDetails
{
	font-size:9px;
}

/*
	Individual Formatting                  			
  		 -  Formatting the dropdown menu  
			- These settings apply to the entire menu 
*/

#navbar
{
	font-size:1em;
	position:absolute;
	z-index:1;
	top:0;
	left:0;
	width:100%;
}

#navbar div div
{
	width:5em;
	font-family:Arial, Helvetica, sans-serif;
	background-color:#66FF99;
	float:left;
	padding: 0 0.5em 0 0.5em;
	margin-left:0.3em;
}


/*  
			- These settings apply to the top level nav buttons	
*/

#buttons
{
	positon:absolute;
	top:0;
	left:0;
}


#buttons div a
{
	text-decoration:none;
}

/*
			- These settings apply to the second level dropdown menus
*/

#dropdown
{
	position:absolute;
	top:1.5em;
	z-index:1;
	left:0;
}



#dropdown div div
{
	background-color:#66FF99;
}

body
{
	font-family:Georgia, "Times New Roman", Times, serif;
	text-align:center;
	font-size:62.5;
}
bennyboywonder is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Having proplems sizing DIVS
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.33782 seconds with 12 queries