Jump to content


Photo
- - - - -

Static image using CSS

static image css image relative

  • Please log in to reply
2 replies to this topic

#1 werdnags

werdnags

    Member

  • Members

  • 20 posts
  • Country: Country Flag

Posted 14 August 2014 - 01:01 PM

Hi All,

 

Can anyone help me with this please?  I am trying to place a logo to span over the top of my header section and fixed header.

 

I have tried various methods but can't get the logo to stay in the same place so it looks correct on different browsers/resolutions sizes.

 

The site is not live yet.

 

This is the code I am trying.....(I think I am a missing something major!)

 

In the CSS I have:

 
.logo-holder {
  width:200px;
  height:200px;
  position:absolute;
 
}


.logo1 {
  position: relative;
  top: 00px;
  left: 150px;
}

and in the HTML I am using:

 
<div class="logo-holder">
<img src="/wp-content/uploads/2014/08/logo_home.png" class="logo1">
</div>

The image shows okay but it will not stay in the same place.

 

Thanks.



#2 Aires

Aires

    Advocate

  • Members

  • 335 posts
  • LocationAlabama
  • Framework Version:DMS2
  • Country: Country Flag

Posted 15 August 2014 - 02:37 AM

Hi, instead of using px where you have 150px try using percentages

#3 Danny

Danny

    Is Awesome!

  • Moderators
  • 17618 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 15 August 2014 - 12:23 PM

Can you provide a link to the site in question and also a concept image of what it is you want to achieve. When we have this, we may be able to assist you.