Directory   Forum   Reviews   Join Blog Affiliates  
Friends?: Twitter - Plurk - StumbleUpon - MyBlogLog - Sphinn - Digg

Go Back   Blog Forum - Bloggeries > Blogging Basics of the Blogosphere > Blogging Basics

Blogging Basics Come here to learn the basics of blogging.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-15-2008, 12:28 PM
arnold's Avatar
arnold arnold is offline
Recent Blog: Theme option pages
Established
 
Join Date: Feb 2008
Location: Tshwane, South Africa
Posts: 14
iTrader: (0)
arnold is on a distinguished road
Default CSS Dilemma

If I insert a graphic in a post in Wordpress I have various alignment choices (top, right, left etc). My problem is with the left and right alignment settings.

When I set these they work as expected but I get a margin problem - there is no gap between image and text. I know this has to be changed in the CSS but I just cannot figure out what class needs to be changed.

Can someone please point me in the right direction?

Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!Stumble this Post!Twit this!
Reply With Quote
  #2 (permalink)  
Old 02-15-2008, 04:58 PM
PaulR's Avatar
PaulR PaulR is offline
Super Moderator
 
Join Date: Aug 2007
Location: In a very strange place.
Posts: 788
iTrader: (0)
PaulR has a reputation beyond repute PaulR has a reputation beyond repute PaulR has a reputation beyond repute PaulR has a reputation beyond repute PaulR has a reputation beyond repute PaulR has a reputation beyond repute PaulR has a reputation beyond repute PaulR has a reputation beyond repute PaulR has a reputation beyond repute PaulR has a reputation beyond repute PaulR has a reputation beyond repute
Default Re: CSS Dilemma

Try this,

PHP Code:
<img width="xxx" height="xxx" align="left" padding-right5px alt="xxxxx" src="/path/to/image/" /> 
If you are aligning the image left then make the padding to the right or vice versa.

Untested but should work.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!Stumble this Post!Twit this!
Reply With Quote
  #3 (permalink)  
Old 02-15-2008, 11:53 PM
timarcher52's Avatar
timarcher52 timarcher52 is offline
Established
 
Join Date: Feb 2008
Location: United States
Posts: 52
iTrader: (0)
timarcher52 will become famous soon enough
Default Re: CSS Dilemma

I think you'll need to put the style="" around the padding css attribute since you did it inline in the tag.
i.e.:
style="padding-right: 5px;"

<img width="xxx" height="xxx" align="left" style="padding-right: 5px;" alt="xxxxx" src="/path/to/image/" />
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!Stumble this Post!Twit this!
Reply With Quote
  #4 (permalink)  
Old 02-16-2008, 01:00 AM
arnold's Avatar
arnold arnold is offline
Recent Blog: Theme option pages
Established
 
Join Date: Feb 2008
Location: Tshwane, South Africa
Posts: 14
iTrader: (0)
arnold is on a distinguished road
Default Re: CSS Dilemma

Thanks, I tried it, WordPress just throws the code regarding the padding away. I then changed the code to <img width="xxx" height="xxx" align="left" style="padding-right: 5px;" ......

This actually works. I just wish I could find a place to do this in the stylesheet so that I do not have to change every entry manually. Thanks so much for steering me in the correct direction.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!Stumble this Post!Twit this!
Reply With Quote
  #5 (permalink)  
Old 02-16-2008, 01:31 AM
PaulR's Avatar
PaulR PaulR is offline
Super Moderator
 
Join Date: Aug 2007
Location: In a very strange place.
Posts: 788
iTrader: (0)
PaulR has a reputation beyond repute PaulR has a reputation beyond repute PaulR has a reputation beyond repute PaulR has a reputation beyond repute PaulR has a reputation beyond repute PaulR has a reputation beyond repute PaulR has a reputation beyond repute PaulR has a reputation beyond repute PaulR has a reputation beyond repute PaulR has a reputation beyond repute PaulR has a reputation beyond repute
Default Re: CSS Dilemma

Quote:
Originally Posted by timarcher52 View Post
I think you'll need to put the style="" around the padding css attribute since you did it inline in the tag.
i.e.:
style="padding-right: 5px;"

<img width="xxx" height="xxx" align="left" style="padding-right: 5px;" alt="xxxxx" src="/path/to/image/" />
Yep, thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!Stumble this Post!Twit this!
Reply With Quote
  #6 (permalink)  
Old 02-18-2008, 09:08 AM
johnisfit's Avatar
johnisfit johnisfit is offline
Recent Blog: Catching Up
Junior Member
 
Join Date: Feb 2008
Posts: 1
iTrader: (0)
johnisfit is on a distinguished road
Default Here is how to do it

Quote:
Originally Posted by arnold View Post
I just wish I could find a place to do this in the stylesheet so that I do not have to change every entry manually. Thanks so much for steering me in the correct direction.
Try this in your stylesheet:

.entry img {padding-right: 5px}

Note that will effect every image in your post. If you want to apply to different rules to different images (for example if you only want to apply this to the image you put in the upper left corner of your post) then you would do something like this in your stylesheet:

.entry img.upperleft {padding-right: 5px;float: left} // added the float for fun

Then when you insert your image you would do it like this:

HTML Code:
<img class=”upperleft” src=”…” width=”x” height=”y” alt=”The alt text for this image” />
Good luck!

Last edited by johnisfit; 02-18-2008 at 09:09 AM. Reason: Forgot the title, whoops!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!Stumble this Post!Twit this!
Reply With Quote
  #7 (permalink)  
Old 02-18-2008, 09:19 AM
arnold's Avatar
arnold arnold is offline
Recent Blog: Theme option pages
Established
 
Join Date: Feb 2008
Location: Tshwane, South Africa
Posts: 14
iTrader: (0)
arnold is on a distinguished road
Default Re: CSS Dilemma

Thanks guys.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!Stumble this Post!Twit this!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 11:25 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Copyright 2008 Bloggeries.com