Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Logo issue on my website

Featured Replies

Hi, I was wondering if anyone could help me. I am new to web design and am just getting to grips with my Adobe Dreamweaver CS5 software.

At the moment I am trying to put a logo in my header section of my website however whenever I do it cuts off half of my logo and I can't get it to display.

The logo is a png file and here is my current coding:

 

#header {
float:left;
width:100%;
height:250px;
}

#logo{
background: url('../Imgs/logo2.png')no-repeat;
float:left;
width:200px;
height:200px;
}

 

I have tried lowering the width of the logo and height and also tried changing the properties of my header section but no matter what I do it doesn't work, I'm not sure if it is an issue with the logo itself - thank you for any help you can give me!

 

I have attached a picture of how it looks at the moment.

post-40876-0-53843800-1343743722_thumb.png

Edited by Renaissance-Design
Please use the code button or tags to format your code.

#header {
       overflow: hidden;
       width:100%;
       height:250px;
}

#logo{
       background: url('../Imgs/logo2.png')no-repeat;
       float:left;
       width:200px;
       height:200px;
}

 

Your header doesn't need to be a float because nothing is alongside it and it's 100% width. Applying overflow: hidden forces it to enclose the floated contents.

Edited by Renaissance-Design

Hi,

Try this, instead of loading ure image as a background image in the css add it to the html I have added an example below

 

html:

<header id="header">
   <a href="homepage link" id="logo">
       <img src="images/logo.png" />
   </a>
</header>

 

css:

 

#header {
   width:960px;
   height:200px;
   margin:0 auto;
}

header a#logo {
   position:relative;
   top:??px;
   left:??px;
   width:???px;
   height:???px;
}

 

I have f ound that by inserting the image in the html and sizing the id element in the css to the exact size works better for me, also with the relative position statement you can use the "top" & "left" styles to position the logo exactly where you want within the header.

 

I hope this helps, best of luck.

 

Charlie h.

Edited by Renaissance-Design
Please use the code button or tags to format your code.

Also when you are adding a background image in your css you don't need to use the ' ' at both ends you only need to do this: background:url(../images/logo.png)0 0 no-repeat;

 

:)

 

sorry for being picky :p

  • Author

Hi,

Try this, instead of loading ure image as a background image in the css add it to the html I have added an example below

 

html:

<header id="header">

<a href="homepage link" id="logo">

<img src="images/logo.png" />

</a>

</header

 

css:

 

#header {

width:960px;

height:200px;

margin:0 auto;

}

 

header a#logo {

position:relative;

top:??px;

left:??px;

width:???px;

height:???px;

}

 

I have f ound that by inserting the image in the html and sizing the id element in the css to the exact size works better for me, also with the relative position statement you can use the "top" & "left" styles to position the logo exactly where you want within the header.

 

I hope this helps, best of luck.

 

Charlie h.

 

Thank you so much for your help Charlie. It has worked - almost. But now the image is just too large and no matter what I do to resize it (changing the pixels) it doesn't help. Have I gone wrong in the codding you gave me? Where it says "homepagelink" what exactly am I to include there? Sorry for sounding like such a novice!

And thank you for the advice on the background I will change that around as well! :)

 

 

@ Renaissance-Design

Thank you as well - I tried it in the light of day and it worked to an extent more of the logo appeared but half of it was still missing.

post-40876-0-81458200-1343811849_thumb.png

Edited by Isla

Hi,

I agree with "Renaissance-Design" the logo would appear to be to big for the css dimensions. If you have trouble resizing your logo reply to this message and attach the original .png or .jpg image file and type the dimensions you have set and ill sort it for you. Hope this helps.

 

Charlie

 

p.s. The part of the code that I wrote "homepage link" this would be the url of your website for example http://www.yourdomain.com.

Edited by charlieh-starrtheme

  • Author

Thank you very much both of you! I got it to work! Using a combination of both or your codes it now sits perfectly :) Thanks so much for your help you've been great I would have been lost figuring it out on my own.

Hi,

No problem I am still learning myself so I know how important outside help is. So anytime you need any help give me a shout :)

 

Hope your site comes together now :).

 

Charlie.

 

p.s. I am new to this forum aswell and not sure how to thank ppl for help, any ideas?

Edited by charlieh-starrtheme

  • Author

Hi,

No problem I am still learning myself so I know how important outside help is. So anytime you need any help give me a shout :)

 

Hope your site comes together now :).

 

Charlie.

 

p.s. I am new to this forum aswell and not sure how to thank ppl for help, any ideas?

Thank you! I may take you up on that Charlie as I progress through this site :)

No problem dude, I am available most days due to having a spinal operation just over a week ago and my plan is to launch my web design business soon so I will be working from home everyday :).

 

Charlie.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.