Jump to content


Photo

Inserting headlines, paragraph text with image


  • Please log in to reply
4 replies to this topic

#1 Tomcat_104

Tomcat_104

    New member

  • New Members
  • 7 posts

Posted 31 August 2011 - 12:38 PM

Hi,

I hope someone out there can help me. I have a layout where I have an H5 + a P that looks fine. The problem start when I try to insert an image in the layout. I can insert an image Float it to the Left, set the margins and all and the H5 jumps to the top (right) like it should but the P text stays under the image and the only way I've found to make it work is change to a H5 and that does not produce acceptable results.

Can anyone suggest a method to get the two items to work together?

David

Attached Files


  • 0

#2 Andrea

Andrea

    Advanced Member

  • Moderators
  • 5,719 posts
  • Facebook:https://www.facebook.com/aandbwebdesignAB
  • LocationSan Antonio, TX

Posted 01 September 2011 - 05:51 AM

There are several problems. By several, I mean many.

You didn't post your head section, what does that and your doctype look like?

Ideally, you should be using an external stylesheet so the style applies to every page of your site and if you have to change anything, you only have to do it once. The link to that external stylesheet belongs into that missing head section.

I assume there are an opening and closing body tag that just wasn't included in the code you posted?

align="center" is deprecated. Instead, use your external stylesheet and write
h2 { text-align: center;}

No need for strong - h tags are bold by default, so defining them as strong is pretty much redundant.

<br />
Is a line break tag - it is not meant to be used to create space. If you want more space between you h2 and what's next, use your external stylesheet to add
h2 { margin-bottom: 15px;}
(of course the number of pixels depends on the amount of space you want)

Your navigation is a list and should be coded as such (with ul and li tags)

If you're floating somethign, you don't add line breaks - again, use the stylesheet to add margins or padding..

All your written detail should be inside paragraph tags (one paragraph at a time) - same goes for what's following your H3 Mission stuff.

You're also missing your div="main" closing tag, but maybe you just didn't copy/paste everything.

The above gives you this - view the source to see exactly what I did.

Now just add margins or padding.

Also, it'd be good to wrap everything between the body tags into a wrapper division and style that to
#wrapper { 
 	margin:  0 auto; (to center things)
 	width: 1020px; (or some other with)
}

To get your navigation list back into a line, see this: http://how-to-build-...h-html-and-css/

Let me know if you have any questions.
  • 0

#3 Tomcat_104

Tomcat_104

    New member

  • New Members
  • 7 posts

Posted 02 September 2011 - 09:05 AM

Thanks so much for the reply and the HELP! I'll try this and see how it helps me after I get back from surgery next Tuesday though it may be weeks or even months.
  • 0

#4 assowImmumb

assowImmumb

    New member

  • New Members
  • 3 posts

Posted 11 January 2012 - 07:30 PM

I should have said they print exactly as they appear on screen, i.e. the colors are flat. I will try the other formats you suggest and see if that makes the difference. thanks
  • 0

#5 Andrea

Andrea

    Advanced Member

  • Moderators
  • 5,719 posts
  • Facebook:https://www.facebook.com/aandbwebdesignAB
  • LocationSan Antonio, TX

Posted 11 January 2012 - 07:35 PM

I should have said they print exactly as they appear on screen, i.e. the colors are flat. I will try the other formats you suggest and see if that makes the difference. thanks


I think you're in the wrong thread - but I looked at the other 2 you've posted in, and this doesn't seem to fit there, either. What did I miss?
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users