Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 06-24-2004, 12:35 AM   #1 (permalink)
NewOldy
Registered User
 
NewOldy's Avatar
 
Join Date: Jun 2004
Posts: 3
NewOldy is on a distinguished road
Html Css Help

I need a little help. . .
This is the index.html
Code:
 <html>
<head>
<link rel="stylesheet" href="css/index.css" type="text/css">
</head>
<body>
	<table width="721px" height="100%" border="0" align="center" cellspacing="0" cellpadding="0" bgcolor="blue">
		<tr>
			<td width="10px" background="images/left.gif">

			</td>
			<td>
	<div class="top"></div><div class="menu"></div>
			</td>
			<td width="10px" background="images/right.gif">

			</td>
		</tr>
	</table>
</body>
</html>
and this is the index.css in a folder named css

Code:
body{		margin-top: 0px;
		margin-left: 0px;
		margin-right: 0px;
		margin-bottom: 0px;}

div.top{	width: 701px;
		height: 35px;
		top: 0px;
		left: 0px;
		background-color: red;}

div.menu{	width: 701px;
		height: 20px;
		top: 0px;
		left: 0px;
		background-color: green;}
with these two images



The problem is that I want the two <div> tags to stay at the top of the table. If I put them both at absolute positioning, I get them collapsed, but it works as is, but the menu div stays in the middle while the top one is where i want it to be. I need the menu div to be right under the top one. But everything isn't working. . .
NewOldy is offline   Reply With Quote
Old 06-24-2004, 10:29 AM   #2 (permalink)
sammy
Code Monkey
 
sammy's Avatar
 
Join Date: Jun 2004
Location: Brooklyn/Rochester
Posts: 53
sammy is on a distinguished road
Send a message via AIM to sammy
ok...lets say you have one div...then another...you can make the second positioned relative. That way, it stays under the first one and moves whenever the first one moves.

if you choose to have them both at absolute...then you must move the second one to another position, otherwise they will overlap.
__________________
sammy is offline   Reply With Quote
Old 06-24-2004, 12:18 PM   #3 (permalink)
NewOldy
Registered User
 
NewOldy's Avatar
 
Join Date: Jun 2004
Posts: 3
NewOldy is on a distinguished road
OK, if I place the top div as absolute, and the second as relative, it doesn't fit snuggley under the top div. It stays center in the screen (verticle). I plan on adding other div, and i dont want them to stay in the middle either.
NewOldy is offline   Reply With Quote
Old 06-24-2004, 12:48 PM   #4 (permalink)
sammy
Code Monkey
 
sammy's Avatar
 
Join Date: Jun 2004
Location: Brooklyn/Rochester
Posts: 53
sammy is on a distinguished road
Send a message via AIM to sammy
you might just want to put both as absolute and position them however you want. But thats going to reek havok depending on which browser u develop on. CSS positioning is different for every browser, especially if you got everything on absolute, but if this is the only few things you want, then jus write 2 style sheets, and load different ones depending on which browser.
__________________
sammy is offline   Reply With Quote
Old 06-24-2004, 12:59 PM   #5 (permalink)
NewOldy
Registered User
 
NewOldy's Avatar
 
Join Date: Jun 2004
Posts: 3
NewOldy is on a distinguished road
I can't place them both to absolute, it messes up.
NewOldy is offline   Reply With Quote
Old 06-25-2004, 11:51 AM   #6 (permalink)
sammy
Code Monkey
 
sammy's Avatar
 
Join Date: Jun 2004
Location: Brooklyn/Rochester
Posts: 53
sammy is on a distinguished road
Send a message via AIM to sammy
placing both of them on absolute will give u full control of where they appear.
__________________
sammy is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
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

BB 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
CSS Explorer trouble (of course) easilyi HTML, XML, Javascript, AJAX 6 11-11-2004 03:59 PM
Help with launching an exy within HTML. Nicotine HTML, XML, Javascript, AJAX 5 05-12-2004 03:00 PM


All times are GMT -8. The time now is 08:40 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting