Solved

css and html positioning of an image element

Posted on 2014-03-06
8
373 Views
Last Modified: 2014-03-06
I am building a site here.  http://162.211.82.64/~ledgers/ Simple html and css.   I have placed the logo to the left of the LEDGERS4u title.  However, I have used absolute positioning so it moves around from device to device.  How do I position this properly with css and html so it stays to the left of the LEDGERS  and I make it all add up title?
0
Comment
Question by:livewirewebsolutions
  • 4
  • 4
8 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39910458
Move <div class="logo-white"></div> just after the opening H1
Amend the margin and left like so
   left: 0;
    margin: -50px 0;


Tweak as required.
0
 

Author Comment

by:livewirewebsolutions
ID: 39910561
like so? see now.
0
 
LVL 58

Accepted Solution

by:
Gary earned 335 total points
ID: 39910621
No, that's not working
Move it to just before the Ledgers 4u span.

Remove position and left from the .logo-white {} css
Add display:inline-block;
Change the margin to
margin: -60px 0;

You will have to hide it at smaller screens as there is no room for it.
0
 

Author Comment

by:livewirewebsolutions
ID: 39910686
mmmmm.  Why is it not working.  It seems to be working perfectly here on a 13" mac and a 19" pc??
0
Easy Project Management (No User Manual Required)

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 58

Expert Comment

by:Gary
ID: 39910701
Not once you go down to smaller screen sizes (800px).
0
 

Author Comment

by:livewirewebsolutions
ID: 39910856
ok.  I have made the changes.  How do i remove when a mobile device is browsing the site?
0
 
LVL 58

Expert Comment

by:Gary
ID: 39910918
Add to the css

@media only screen and (max-width: 767px) {
.logo-white {
display:none
}
}

Open in new window

0
 

Author Comment

by:livewirewebsolutions
ID: 39911084
got it.  awesome thanks!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

705 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

20 Experts available now in Live!

Get 1:1 Help Now