Jump to content

Iinline Header Box

Recommended Posts

Can anyone help me. this may be a noob question but...... I am trying to create a website and am trying to position two spaces I have for my header side by side. The left is going to have a logo inserted into the html code and the right side is going to be using a background image place in the css code. I cannot eem to get the 2 boxes to sit side by side in the header tags. Can someone help me? Heres the HTML:

<body><div id="container">	 <div id="header">		 <div class="lftimg"><img src="images/logo.gif"  />		    </div>		    <div class="rtimg">		    </div>			    </div>          </div></body>

Heres the CSS:

body { margin: 10px;    padding: 0px;    text-align: center; background-color: #DAFEFD; color: #fff;}#container {    margin: 0px auto; background: url(../images/background.gif) repeat-y;    text-align: left; width: 900px; height: 800px;}#header { width: 900px; height: 160px; display: inline;}#header .lftimg {    margin: 0px; height:160px;    width: 239px;}#header .rtimg {    margin-left: 239px; height:160px;    position: relative; background:url(../images/header_rt.gif);    top: 0px;    left: 0px;    width: 661px;}


  • Like 1

Share this post

Link to post
Share on other sites

Try adding float: left; to your left and right boxes.

Share this post

Link to post
Share on other sites

Join the conversation

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

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.


  • Create New...