Bloggeries

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

Blogging Basics Come here to learn the basics of blogging.

Learn how to set up a blog, start blogging, produce quality content and use these forums as your internet marketing courses.

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old February 15th, 2008, 12:28 PM
arnold's Avatar
Brand Spanking New Member
 
Join Date: Feb 2008
Location: Tshwane, South Africa
Posts: 12
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.usReddit! Stumble this Post!Twit this!
Reply With Quote

Don't Like Ads?? Register as a Member and These Ads Will Disappear!

-->
  #2  
Old February 15th, 2008, 04:58 PM
PaulR's Avatar
Blogtacular
Super Moderator
 
Join Date: Aug 2007
Location: In a very strange place.
Posts: 708
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.usReddit! Stumble this Post!Twit this!
Reply With Quote
  #3  
Old February 15th, 2008, 11:53 PM
timarcher52's Avatar
Bonafide Blogger
 
Join Date: Feb 2008
Location: United States
Posts: 48
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.usReddit! Stumble this Post!Twit this!
Reply With Quote
  #4  
Old February 16th, 2008, 01:00 AM
arnold's Avatar
Brand Spanking New Member
 
Join Date: Feb 2008
Location: Tshwane, South Africa
Posts: 12
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.usReddit! Stumble this Post!Twit this!
Reply With Quote
  #5  
Old February 16th, 2008, 01:31 AM
PaulR's Avatar
Blogtacular
Super Moderator
 
Join Date: Aug 2007
Location: In a very strange place.
Posts: 708
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.usReddit! Stumble this Post!Twit this!
Reply With Quote
  #6  
Old February 18th, 2008, 09:08 AM
johnisfit's Avatar
Brand Spanking New 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; February 18th, 2008 at 09:09 AM.. Reason: Forgot the title, whoops!
Digg this Post!Add Post to del.icio.usReddit! Stumble this Post!Twit this!
Reply With Quote
  #7  
Old February 18th, 2008, 09:19 AM
arnold's Avatar
Brand Spanking New Member
 
Join Date: Feb 2008
Location: Tshwane, South Africa
Posts: 12
iTrader: (0)
arnold is on a distinguished road
Default Re: CSS Dilemma

Thanks guys.
Digg this Post!Add Post to del.icio.usReddit! Stumble this Post!Twit this!
Reply With Quote
Reply

Bookmarks

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 06:58 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 RC1

Blog Directory | Submit Blog | Latest Blogs | Blogging Blog | Blog Reviews | Blog Forum