Solved

Left menu with a header image

Posted on 2016-10-03
6
58 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 43

Accepted Solution

by:
zephyr_hex (Megan) earned 500 total points
ID: 41827088
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 22

Expert Comment

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

Author Comment

by:breeze351
ID: 41830514
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 22

Expert Comment

by:Kim Walker
ID: 41830528
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 43

Expert Comment

by:zephyr_hex (Megan)
ID: 41840996
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
ID: 41851094
Got it thanks
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

696 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