Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-27-2009, 05:10 PM   PM User | #1
Eco2020
New Coder

 
Join Date: Oct 2008
Posts: 25
Thanks: 4
Thanked 0 Times in 0 Posts
Eco2020 is an unknown quantity at this point
Margins around ad/picture space

Hi,

On both the websites we run, www.eco20-20.com and www.greencareersguide.com the text wraps to closely to the ad or picture that we have and makes articles very hard to read. Here is an example from each site.

http://www.eco20-20.com/How-to-Find-...our-Needs.html

http://www.greencareersguide.com/Gre...eneurship.html

How do I fix this?

Thank you
Eco2020 is offline   Reply With Quote
Old 10-28-2009, 01:51 AM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello Eco2020,
The nearest div that has an id/class I could style is .main-space so this works but it affects all the images and the float right ones don't need a right margin.
It would probably work better if you apply a class to the images and style that instead of this blanket approach but you'll get the idea ... try adding this to your CSS for now -
Code:
.main-space img {
margin: 0 10px 0 0;
}
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 10-28-2009, 01:51 PM   PM User | #3
Eco2020
New Coder

 
Join Date: Oct 2008
Posts: 25
Thanks: 4
Thanked 0 Times in 0 Posts
Eco2020 is an unknown quantity at this point
I just had a follow up. That worked really well on all my images. Thank you so much. The images are working but the google ads are still not working with the right border.

Any ideas?
Eco2020 is offline   Reply With Quote
Old 10-28-2009, 02:04 PM   PM User | #4
Eco2020
New Coder

 
Join Date: Oct 2008
Posts: 25
Thanks: 4
Thanked 0 Times in 0 Posts
Eco2020 is an unknown quantity at this point
Also, how would that work on the www.greencareersguide.com website as the css does not have that item?
Eco2020 is offline   Reply With Quote
Old 10-28-2009, 03:12 PM   PM User | #5
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Quote:
Originally Posted by Eco2020 View Post
I just had a follow up. That worked really well on all my images. Thank you so much. The images are working but the google ads are still not working with the right border.

Any ideas?
I didn't think it worked well with the images that are floated right. That's why I thought you should add a class to your images so you can style the right ones differrent than the left ones.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Users who have thanked Excavator for this post:
Eco2020 (10-28-2009)
Old 10-28-2009, 03:27 PM   PM User | #6
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Quote:
Originally Posted by Eco2020 View Post
Also, how would that work on the www.greencareersguide.com website as the css does not have that item?
Again, if you're images had a class...

The images containing div is not needed and you can add the classs something like this -
Code:
<a href="http://www.greencareersguide.com/Green-Entrepreneurship.html"> <img  class="limage" height="90" width="100" vspace="5" alt="Entrepreneur" src="http://www.greencareersguide.com/image-files/entrepreneur1.jpg"/></a>
Then you can style it from your CSS like this -
Code:
.limage {
float: left;
margin: 0 10px 0 0;
}
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Users who have thanked Excavator for this post:
Eco2020 (10-28-2009)
Old 10-28-2009, 05:10 PM   PM User | #7
Eco2020
New Coder

 
Join Date: Oct 2008
Posts: 25
Thanks: 4
Thanked 0 Times in 0 Posts
Eco2020 is an unknown quantity at this point
Smile

Thanks so much it worked great!!
Eco2020 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:26 AM.


Advertisement
Log in to turn off these ads.