Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,148,894 members, 7,802,877 topics. Date: Saturday, 20 April 2024 at 12:54 AM

Help!! - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Help!! (965 Views)

(2) (3) (4)

(1) (Reply) (Go Down)

Help!! by Keky(m): 8:22am On Aug 14, 2014
Hello Everybody, still learning Web Designing using Html5 and css, but pls who could explain how I'm gonna place the image on the webpage on the same line with the text there, anytime I try, the image goes down and the text stay up or vice versa, pls I need a reply. Thanks.
Re: Help!! by MrAnonymous: 9:04am On Aug 14, 2014
Depends on how you want it to look. You can either use a table on the whole thing or a style="float:left;" on the image.
Re: Help!! by Keky(m): 9:06am On Aug 14, 2014
MrAnonymous: Depends on how you want it to look. You can either use a table on the whole thing or a style="float:left;" on the image.
Pls how am I gonna use it? am still a beginner here.
Re: Help!! by MrAnonymous: 9:17am On Aug 14, 2014
Keky: Pls how am I gonna use it? am still a beginner here.
The table or the float style?
Re: Help!! by Keky(m): 9:21am On Aug 14, 2014
MrAnonymous: The table or the float style?
Float style.
Re: Help!! by fattbabakay(m): 9:55am On Aug 14, 2014
Keky: Float style.
inside ur css... Class {float: right;}
Re: Help!! by Keky(m): 9:58am On Aug 14, 2014
fattbabakay: inside ur css... Class {float: right;}
after img src? Or before?
Re: Help!! by Nobody: 10:07am On Aug 14, 2014
This is like a merry-go round in a gaddamn circus, you are trying to give a simple snippet to someone that cannot use it.

Eating popcorn and watching. . .
Re: Help!! by fattbabakay(m): 10:24am On Aug 14, 2014
Keky: after img src? Or before?
<img src="image.jpg " style="float:left;"> ...U've not startd CSS??
Re: Help!! by MrAnonymous: 10:41am On Aug 14, 2014
Keky: Float style.
<img src="IMAGE URL" style="float:left;" /><span style="float:left;">TEXT GOES HERE</span>

Notice that both elements are and should be floated left.

Like I said, it depends on how you want it to look. Using the float style will make the text appear both beside and under the image. Using the table element will only make text appear beside the image (not under).
Re: Help!! by Nobody: 10:44am On Aug 14, 2014
As you have explained that, better explain to him how to clear things coming after with css before he runs into another problem and declares another state of emmergency.
Re: Help!! by MrAnonymous: 10:49am On Aug 14, 2014
dhtml18: As you have explained that, better explain to him how to clear things coming after with css before he runs into another problem and declares another state of emmergency.
..... Or you could do it yourself.
Re: Help!! by Nobody: 11:05am On Aug 14, 2014
MrAnonymous: ..... Or you could do it yourself.
I am just an umpire on this thread
Re: Help!! by micodon(m): 2:01pm On Aug 14, 2014
<div style=“float: left“>
<Img src=“” alt=“” />
</div>
<div style=“float: left“>Text goes here</div>
<div style="clear: both"</div>

Or
<div>
<div style=“display: inline-block“>
<Img src=“” alt=“” />
</div>
<div style=“display: inline-block“>Text goes here</div>
</div>
Re: Help!! by Nobody: 2:09pm On Aug 14, 2014
Let me provide my own solution, without using CSS

Try any of the below (the first one should solve your problem):
<img src="15.jpg" height="50" align="absmiddle"> Text aligned to the center
<br/>
<br/>
<img src="15.jpg" height="50" align="text-bottom"> Text aligned to bottom
<br/>
<br/>
<img src="15.jpg" height="50" align="text-top"> Text aligned to the top
<br/>
<br/>
<img src="15.jpg" height="50" align="absmiddle" hspace="10"> Text aligned to the center
Re: Help!! by Keky(m): 2:18pm On Aug 14, 2014
MrAnonymous:
<img src="IMAGE URL" style="float:left;" /><span style="float:left;">TEXT GOES HERE</span>

Notice that both elements are and should be floated left.

Like I said, it depends on how you want it to look. Using the float style will make the text appear both beside and under the image. Using the table element will only make text appear beside the image (not under).
I actually want the header H1 to be on the same line with the image.
Re: Help!! by Nobody: 2:57pm On Aug 14, 2014
Then you go like this: <h1 style="display:inline">this will show on the same line like normal text</h1>
Re: Help!! by MrAnonymous: 3:31pm On Aug 14, 2014
Keky: I actually want the header H1 to be on the same line with the image.
I meant... If the header does not fit in one line, where will the second line start from? directly under the first line or directly under the image? (assuming the image is small like an avatar).

Try this first to see if it does what you want:

<div style="max-width:100%;"><span style="float:left; display:inline-block;margin-right:3px;"><img src="IMAGE URL" /></span>
<span style="float:left; display:inline-block;"><h1>HEADER TEXT</h1></span></div>

(1) (Reply)

Pls Which Website Can Offer Me Hosting And Domain Name For Free?? / Web Don Allow OYINBO Connect 9ja People - To Sabi PIDGIN Na The Key :) / Reddit Has 7.55 Billion Page Views Every Month

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 17
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.