7 Replies - 6348 Views - Last Post: 27 March 2011 - 07:36 AM

#1 LeeWright  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 27-March 11

Remove space between image and <div style

Posted 27 March 2011 - 02:45 AM

Hi there,

Having a little problem with my HTML/CSS code and I wondered if one of you guys could help me out?

OK well here's the problem; I have an image, then another image below that, then an area where I can place some text (the "<div style" bit). The images fit together fine but there is a gap between the second image and my area for placing text. I hope that makes sense, here is the code:

<p align="center"><img src="image1.png" width="958" height="224" title="" alt="" /><img src="image2.png" width="993" height="65" title="" alt="" /></p>
<div style="position: relative; background: #FFFFFF; width: 958px; height: 600px">



I know it's probably something really simple... but I am really simple so I cant work it out lol. So if one of you good people could help me out I would be very grateful.

Thanks
Lee

Is This A Good Question/Topic? 0
  • +

Replies To: Remove space between image and <div style

#2 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Remove space between image and <div style

Posted 27 March 2011 - 04:41 AM

wait, you're putting images in a paragraph, but leaving text out of the paragraph? Well, I'm not used to that, but I can try. For your div try:
<div style="position: relative; background: #FFFFFF; width: 958px; height: 600px margin: 0; padding: 0;">

Was This Post Helpful? 1
  • +
  • -

#3 LeeWright  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 27-March 11

Re: Remove space between image and <div style

Posted 27 March 2011 - 06:26 AM

Hi Env,

Thanks for your reply, I have tried what you suggested but regrettably it doesn't affect the div placement. Any other suggestions?
Was This Post Helpful? 0
  • +
  • -

#4 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Remove space between image and <div style

Posted 27 March 2011 - 06:31 AM

Can you please take a screen shot of what you have? do you want the text to wrap around the image?
Was This Post Helpful? 1
  • +
  • -

#5 LeeWright  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 27-March 11

Re: Remove space between image and <div style

Posted 27 March 2011 - 06:45 AM

Please find the image attached:

Attached image(s)

  • Attached Image

Was This Post Helpful? 0
  • +
  • -

#6 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Remove space between image and <div style

Posted 27 March 2011 - 06:48 AM

Okay, now it's easier to see what you're talking about. For one, I wouldn't put the paragraph tags on images. You should put the images and paragraph in one div also.
Was This Post Helpful? 1
  • +
  • -

#7 LeeWright  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 27-March 11

Re: Remove space between image and <div style

Posted 27 March 2011 - 07:32 AM

Attention everyone "EnvXOwner" is a coding god and my personal hero!!! :bigsmile:

Thanks buddy it worked! And it was really simple lol, thanks again for your help. (I'll be sure to press that + button) :wink:
Was This Post Helpful? 0
  • +
  • -

#8 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Re: Remove space between image and <div style

Posted 27 March 2011 - 07:36 AM

lol. I'm glad that I could help! If you have any other questions just come back to the forum and ask away :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1