Jump to content

Simple CSS Question


TJMAudio
 Share

Recommended Posts

I am trying to learn how to do complete site designs with no tables, but am a complete beginner to CSS.  I am having a problem with getting two divs to align on the same horizontal level, as you can see from this image:

 

http://www.image-ant.org/files/c8098f952647b45e03e55eee71b7f762.jpg

 

Here is my code:

 

<!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>Untitled Website</title>
<style type="text/css">
body, td, a, p { font-family: arial,sans-serif; }
body { background: url(images/top_stretch_bg.gif) repeat-x; font-size: 13px; margin: 3px 8px 2em; }
#logo { margin-left: 15px; margin-top: 0; width: 250px; }
div#container { margin-left: auto; margin-right: auto; width: 90%; }
div#toprss { width: 100%; text-align:right; }
</style>
</head>

<body>
<div id="container">
<div id="logo">
    	<a href="/index.html" title=".com Home">
    		<img src="images/logo.gif" title=".com" border="0" /></a>
</div>
    <div id="toprss">
    	<a href="#subscribe" title="Subscribe to .com">
    		<img src="images/rss_top_right.gif" title="Subscribe to .com" border="0" /></a>
    </div>
</div>
</html>

 

The RSS feed needs to be at a margin-top: 0; but it drops down, due to the logo div being there.  How do I fix this?

Link to comment
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.