The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Need help with putting pictures and text on the same line...
HungryWolf
post Oct 7 2006, 08:47 PM
Post #1





Group: Members
Posts: 7
Joined: 7-October 06
Member No.: 360



I don't know why this is happening, but because I'm a noob when it comes to coding of any sort, I thought it would be easier to just ask here.

Here's my HTML: http://www.freewebs.com/hungrywolf/code.html

If someone could check that out and see why it's happening, I would be extremely grateful.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies(1 - 13)
pandy
post Oct 8 2006, 12:16 AM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



QUOTE(HungryWolf @ Oct 8 2006, 03:47 AM) *

If someone could check that out and see why it's happening, I would be extremely grateful.

What's "this" that you don't want to happen?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
HungryWolf
post Oct 8 2006, 10:24 AM
Post #3





Group: Members
Posts: 7
Joined: 7-October 06
Member No.: 360



I need help putting pictures and text on the same line. I don't understand why it's not working, but it's not.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Oct 8 2006, 10:39 AM
Post #4


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



A page displaying the HTML source isn't very useful. An HTML page using that source would be more useful. But with that said...

What image are you trying to put on the same line as what text? I didn't see anywhere that you had tried to do this.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
HungryWolf
post Oct 8 2006, 07:36 PM
Post #5





Group: Members
Posts: 7
Joined: 7-October 06
Member No.: 360



QUOTE(Darin McGrew @ Oct 8 2006, 11:39 AM) *

A page displaying the HTML source isn't very useful. An HTML page using that source would be more useful. But with that said...

What image are you trying to put on the same line as what text? I didn't see anywhere that you had tried to do this.


I don't understand why that would be more useful, but:

http://www.freewebs.com/oddducks/help.html
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Peter1968
post Oct 9 2006, 03:43 AM
Post #6


Serious Coder
*****

Group: Members
Posts: 448
Joined: 23-September 06
Member No.: 213



The whole thing is arranged as a weird table, rows, cells and all. Not sure if you're doing that or the freewebs page creator is.

But, you have the text and the image separated by paragraph tags. Get rid of them and the text and image should be on the same line.

CODE
<div style="overflow: auto; width: 770px; height: 315px">
        <p>This is what it's doing.</p>
        <p>I have text and when I try to put a picture next to it, it automatically goes to the line downwards from it.</p>
        <p>Example<img src="images/katamariballfull.gif" width="24" height="23"></p>
      </div>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Oct 9 2006, 03:58 AM
Post #7


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



QUOTE(HungryWolf @ Oct 9 2006, 02:36 AM) *

I don't understand why that would be more useful, but:

Because you had about 10 images in the page you posted the code of and you didn't tell us which one you had problems with. There wasn't text close to any of them, so rather hard to guess. Also because everyone had to copy-paste the code to be able to see the page in a browser. We can use View Source to see the coding.

QUOTE

Much more useful. smile.gif
Peter1968 provided the answer. But don't get rid of all paras. Put the image inside the para with the text you want it next to.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
HungryWolf
post Oct 11 2006, 10:05 PM
Post #8





Group: Members
Posts: 7
Joined: 7-October 06
Member No.: 360



That's no help, unless I'm not understanding what you're telling me. The text and the picture are both in the same paragraph yet they're still doing this. 'Example' stands for text that should be next to the picture, but instead for some reason ends up above it. Is there something in the script that might be doing this?

This post has been edited by HungryWolf: Oct 11 2006, 10:07 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Oct 11 2006, 11:39 PM
Post #9


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Your style sheet is using "display : block" for the image, so the browser is displaying the image as a block-level element.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
HungryWolf
post Oct 12 2006, 02:24 PM
Post #10





Group: Members
Posts: 7
Joined: 7-October 06
Member No.: 360



QUOTE(Darin McGrew @ Oct 12 2006, 12:39 AM) *

Your style sheet is using "display : block" for the image, so the browser is displaying the image as a block-level element.


What would I have to change to make it not do that?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
jimlongo
post Oct 12 2006, 02:39 PM
Post #11


This is My Life
*******

Group: Members
Posts: 1,128
Joined: 24-August 06
From: t-dot
Member No.: 16



QUOTE(HungryWolf @ Oct 12 2006, 03:24 PM) *

QUOTE(Darin McGrew @ Oct 12 2006, 12:39 AM) *

Your style sheet is using "display : block" for the image, so the browser is displaying the image as a block-level element.


What would I have to change to make it not do that?



remove img from the in-line style declaration in your html
change
CODE
<style type="text/css">td img {display: block;}</style>

to
CODE
<style type="text/css">td {display: block;}</style>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
HungryWolf
post Oct 12 2006, 09:01 PM
Post #12





Group: Members
Posts: 7
Joined: 7-October 06
Member No.: 360



Ah, that works but it completely screws up my template.

Oh well, I'll either suffer or find a new template.

Thanks.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
HungryWolf
post Oct 20 2006, 10:02 AM
Post #13





Group: Members
Posts: 7
Joined: 7-October 06
Member No.: 360



I was wondering; would I be able to put that script before where I put the pictures in my divider and end it after I put the pictures in my divider, so I can have it how I want: the pictures sitting next to the text instead of under it, and also keep the template from screwing up? If it's possible at all, it shouldn't be too hard considering this is all in a <div> and shouldn't affect the whole thing.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Oct 20 2006, 10:57 AM
Post #14


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



If I understand the question correctly, then no, you can't put a style element inside a div element. The style element goes inside the head element.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 06:21 AM