Jump to content

Recommended Posts

Posted

What is wrong with this code;

 

<div id="header">

<h1><a href="index1.html">Plantra Tips and Tricks</a></h1>

<img src="images/plantra_logo.png width="300" height="100"/>

</div><!--ends header div-->

Posted

It's missing the closing quote after your image file.

 

<img src="images/plantra_logo.png" width="300" height="100"/>

Posted

And last time I looked at your coding, you were not using XHTML doctype - unless that's changed, the closing slash in the img tag is also wrong.

  • 1 month later...
Posted

Hi guys,

 

I have been out of pocket for awhile but I'm back...I need to revisit images....What is wrong with this code to add a full background image? I will add my css file as an attch.

style.css

Posted

It is really better if you start a new thread for a new problem/question/issue - and it's easiest for us to help if you have a link. That way, we can see html, CSS AND the images. It's also helpful if you describe the problem, unless it's obvious when looking at the linked page. Just 'wrong' and the CSS you uploaded don't tell me anything - I can only guess.

 

Is your image not showing up?

 

Is it showing up, but not where/how you want it? (So what is it doing and what should it be doing?)

 

Looking at your CSS I only see for sure - and that has nothing to do with a background image - that this is wrong:

*
{
margin: 0px auto;
padding: 0px auto;
color: #000;
}

It should look like this:

*
{
margin: 0;
padding: 0;
}

 

The * is the universal place holder - by using it, you apply whatever you write there to every single tag in your entire page/site. My version is used to remove any default paddings or margins from anything that comes with one. For example, paragraphs have different margins/paddings, depending on what browser. By making them all zero at first, and then adding them back in later as you want, makes it easier to have your pages look more the same across browsers. I guess adding the color isn't exactly wrong, but unusual - mostly, global colors are added to the body or html tag.

 

Adding the right-left margin of auto is done to center things. You don't want everything centered (hopefully). That part is mostly added to a wrapper division which centers your content division on the monitor.

 

And - and that's one of my many pet peeves: When you say '0', you mean zero anything, so there's no need to say 0px - just 0 will make everything zero: px, em, %, cm, whatever. Adding the 'px' to the '0' isn't wrong, just redundant.

Posted

OK...Let's not peeve Andrea....I will open a new topic with a link :D

 

Too late

:P

 

Just kidding - but I did move your new thread into the proper forum :D

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...