Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Horizontal Spacing

Reply
Thread Tools

Horizontal Spacing

 
 
mcp6453
Guest
Posts: n/a
 
      01-23-2006
Here's an easy one. I want a picture flush on the left margin of a page
with text aligned on the right side of the picture. The code
align="left" border="0" allows me to do that, but the text is too close
to the picture. I added hspace="5", but that obviously applies space to
both sides of the picture. Is there a way to add space to the right side
only?
 
Reply With Quote
 
 
 
 
Els
Guest
Posts: n/a
 
      01-23-2006
mcp6453 wrote:

> Here's an easy one. I want a picture flush on the left margin of a page
> with text aligned on the right side of the picture. The code
> align="left" border="0" allows me to do that, but the text is too close
> to the picture. I added hspace="5", but that obviously applies space to
> both sides of the picture. Is there a way to add space to the right side
> only?


Use CSS:
img.foo{
float:left;
margin-right:5px;
}
HTML:
<img class="foo" src="..." alt="..."><p>bla bla bla</p>


--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Dr. Feelgood - She Does It Right
 
Reply With Quote
 
 
 
 
mcp6453
Guest
Posts: n/a
 
      01-24-2006
Els wrote:
> mcp6453 wrote:
>
>
>>Here's an easy one. I want a picture flush on the left margin of a page
>>with text aligned on the right side of the picture. The code
>>align="left" border="0" allows me to do that, but the text is too close
>>to the picture. I added hspace="5", but that obviously applies space to
>>both sides of the picture. Is there a way to add space to the right side
>>only?

>
>
> Use CSS:
> img.foo{
> float:left;
> margin-right:5px;
> }
> HTML:
> <img class="foo" src="..." alt="..."><p>bla bla bla</p>
>
>


I don't have access to the css file. Can I use inline css? The site is a
blog that accepts HTML.
 
Reply With Quote
 
Mark Parnell
Guest
Posts: n/a
 
      01-24-2006
Deciding to do something for the good of humanity, mcp6453
<(E-Mail Removed)> declared in alt.html:

> I don't have access to the css file. Can I use inline css?


I don't see why not.

<img style="float:left; width:100px; margin-right:5px;" src="..."
alt="..."><p>bla bla bla</p>

Replace the width above with the actual width of the image.

--
Mark Parnell
================================================== ===
Att. Google Groups users - this is your last warning:
http://www.safalra.com/special/googlegroupsreply/
 
Reply With Quote
 
mcp6453
Guest
Posts: n/a
 
      01-24-2006
Mark Parnell wrote:
> Deciding to do something for the good of humanity, mcp6453
> <(E-Mail Removed)> declared in alt.html:
>
>
>>I don't have access to the css file. Can I use inline css?

>
>
> I don't see why not.
>
> <img style="float:left; width:100px; margin-right:5px;" src="..."
> alt="..."><p>bla bla bla</p>
>
> Replace the width above with the actual width of the image.
>


It works perfectly. Thanks!
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Obout Tree View - Node Vertical/Horizontal Spacing ? quantass ASP .Net 1 01-21-2007 12:04 PM
Menu spacing v1.5 FF Willie Buck Merle Firefox 5 12-02-2005 05:48 AM
can't remove horizontal spacing Stijn Goris HTML 1 09-16-2004 10:17 AM
Horizontal Spacing (newbie) jch HTML 7 01-26-2004 12:26 PM
Re: Spacing radio buttons in a PlaceHolder Craig Deelsnyder [MVP] ASP .Net 0 07-15-2003 12:50 AM



Advertisments