Solved

Left menu with a header image

Posted on 2016-10-03
6
33 Views
Last Modified: 2016-10-19
I need to create something that looks like this
---------------------------------------------------------------------------------------------
| Menu Item 1     | Image                                                                     |
| Menu Item 2     |                                                                                 |
| Menu Item 3     |                                                                                 |
| Menu Item 4     |                                                                                 |
---------------------------------------------------------------------------------------------

I can't figure out how to display the menu items and still have the image for the logo displayed to the right.
0
Comment
Question by:breeze351
  • 2
  • 2
  • 2
6 Comments
 
LVL 42

Accepted Solution

by:
zephyr_hex earned 500 total points
Comment Utility
Create a container div, and then two child divs inside that container div.  The first div holds the content of the menu items, and the second div holds the image.  Then style the first child div to float left.

Here is a Fiddle Demo.

HTML
<div id="container">
  <div id="menu">
    <ul>
      <li>Item 1</li>
      <li>Item 2</li>
      <li>Item 3</li>
      <li>Item 4</li>
      <li>Item 5</li>
    </ul>
  </div>
  <div id="image">
    <img src="http://findicons.com/files/icons/1995/web_application/48/smiley.png"> </div>
</div>

Open in new window


CSS
#menu {
  float:left;
}

Open in new window

0
 
LVL 21

Expert Comment

by:Kim Walker
Comment Utility
You can also make the image a background-image of the menu item and position it right-center.
0
 

Author Comment

by:breeze351
Comment Utility
Zeph
No Joy.  I copied your code and tried it.  The image appears below the menu!

<!DOCTYPE html><head>
	<title>Menu</title>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<link rel="stylesheet" type="text/css" href="Fred.css">
</head>


<div id="container">
  <div id="menu">
    <ul>
      <li>Item 1</li>
      <li>Item 2</li>
      <li>Item 3</li>
      <li>Item 4</li>
      <li>Item 5</li>
    </ul>
  </div>
  <div id="image">
    <img src="Images/Lang_Logo.jpg"> </div>
</div>

Open in new window


Fred.css
#menu {
  float:left;
}

Open in new window

0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 21

Expert Comment

by:Kim Walker
Comment Utility
There must be a conflict with other styles. What is the base URL of your Fred.css and Images/Lang_Logo.jpg files? Or better yet, what is the URL to your test file if it's available remotely?
0
 
LVL 42

Expert Comment

by:zephyr_hex
Comment Utility
Were you able to locate the conflicting CSS?  If not, can you set up a Fiddle Demo that demonstrates the problem?
0
 

Author Closing Comment

by:breeze351
Comment Utility
Got it thanks
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now