Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    May 2009
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Padding for an image

    Hey guys, I'm trying to see how I can have the words here lineup with the picture.



    The whole page is a flash page using an xml file for the content. Inside that xml, I can use html in this particular section. So this part is seen as:

    Code:
    <img src="files/gallery/bio/picture.jpg"><p>NAME
    CEO
    [...]
    </p>
    I'm trying to get the words to align with the top of the image and with the left. Is it best to modify the words or the image, in this case, and how would I do it?
    Last edited by Geruvah; 05-08-2009 at 12:05 PM.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Not enough info Geruvah,
    We need to see the code and the CSS that controls that whole section, including the container the image and text are in.
    A link would be easiest.
    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

  • #3
    New Coder
    Join Date
    Dec 2007
    Location
    Jersey, UK
    Posts
    17
    Thanks
    0
    Thanked 2 Times in 2 Posts
    As Excavtor states, it is difficult to give an accurate answer without a link or further HTML/CSS.
    My guess is that you have some default padding or margin on that image.

    Code:
    img {
         padding: 0 5px 5px 0;
    }
    or
    Code:
    img {
         margin: 0 5px 5px 0;
    }
    Just make sure you are specific when selecting that image in your css. Ideally you should give your image a unique id.
    Code:
    <img id="abe-pic" src="files/gallery/bio/abe.jpg" />
    You should also close your image tag off properly as highlighted above.
    --> Check me out <--

  • #4
    New Coder
    Join Date
    May 2009
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry guys.

    The website is www.directignition.us

    As I said, it's HTML but it's in an XML file, so there's no head part to use CSS.

    Code:
    <?xml version='1.0' encoding='ISO-8859-1' ?>
    <menu name="The Talent" module = "htmlGal">
    
    <!--
    	Person's Profile
    	-->
    	<submenu name="Person's name"><![CDATA[<img src="files/gallery/bio/picture.jpg"><p>NAME
    CEO
    	
    (body text goes here).</p>]]>
    	</submenu>
    
    </menu>
    Last edited by Geruvah; 05-08-2009 at 12:05 PM.

  • #5
    New Coder
    Join Date
    May 2009
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey guys, just wanted to know if anybody still knows of a way to do this without using CSS.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •