Jump to content

Simple CSS Question


TJMAudio

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
https://forums.phpfreaks.com/topic/127109-simple-css-question/
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.