Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

'wrapping' text around an image

i hate to ask this question, seeing as it's probably easy as all hell.. but how on earth would i make text kinda 'wrap' around an image.?
that probably isn't  an accurate description of what i mean, so heres an image..
http://img408.imageshack.us/img408/6121/nytimesav3.png[/img]
the text just kinda formats itself, avoiding the image. of course if I try this, its just goign to in sert the image horizontally into the paragraph, and look ass-ugly.

how is this achieved?
 

$t3v0

Awesome Bro

These are vspace & hspace (Horizontal and vertical space). To achieve this effect you simply add the following codes to your image's properties:

Code:
hspace="4" vspace="4"

So as an example in HTML:

Code:
<img src="images/pic1.jpg" width="221" height="400" hspace="4" vspace="4"/>

4's being an example (it's what i use). The larger the number, the larger the gap, but that goes without saying.
 

___

Sponsor

Better yet don't use HTML for formatting and just float the image using CSS, everything else will move around it naturally. 

Code:
img [.class/#id]
{
float: [left/right/none];
}

To place a space around it use padding:

Code:
{
padding: [ all / horiz, vert / top, left, bottom, right]
}
 
css is too complicated.

i've found a super-easy way to float tables and images with very basic html, since you dropped the word 'float' and made my googling that much easier. =D
thanks.
 

___

Sponsor

There you are wrong sir, CSS is far less complicated and far more precise than HTML layouts once you get to know it!  Besides HTML formatting tags are depreciated and may not be supported by browsers soon.

Imagine a whole 200 lines of nested tables to lay out a site shrunk down to a few simple lines of CSS... it's sexy, it's tempting, you know you want it.  This is the light side, seducing you away from the dark age of HTML table abuse... Come to us...

Anyway, glad it helped you out.  I'll go evangelize someone else for a while, but don't think I won't be back! (,,,)(O,..,O)(,,,)
 

$t3v0

Awesome Bro

Nphyx":2vd7be0g said:
Besides HTML formatting tags are depreciated and may not be supported by browsers soon.

So every single site that has been created using HTML, every penny that people have spent for their websites to work will all go to waste? I hope they'll be compensated otherwise it's a joke!
 

___

Sponsor

$t3v0":pdd40k4y said:
Nphyx":pdd40k4y said:
Besides HTML formatting tags are depreciated and may not be supported by browsers soon.

So every single site that has been created using HTML, every penny that people have spent for their websites to work will all go to waste? I hope they'll be compensated otherwise it's a joke!

Nah they'll probably still continue to kinda-sorta-work in quirks mode for a long time (and kinda-sorta-unreliably-functionalish is all they really ever have been), but you know how Microsoft tends to say at some point "ah fuck it, waste of time" and stop supporting old stuff.  Anyone remember MS Word 6.0?  Yeah, like that.  Firefox, who knows, they're all about standards compliance so as long as you keep setting your doctypes to HTML 4.0 properly the depreciated tags will work, if you set them to 5.0 or XHTML 2 or such when those standards are released, don't count on it. 

Besides, these designs are increasingly looking more and more dated and incompetent.  CSS has been around nearly a decade now and that's exactly how long it's been since any extensions have been made to HTML for formatting purposes; it behooves a designer of any stripe to get with the program and learn CSS.  It's really, really easy and I guarantee when (not if but when) you do finally settle down and spend the day or two it takes to get familiar with it you will kick yourself for each site you wasted time, effort, and bandwidth on.  You'll be stunned, excited, inspired, and eventually completely in love with how much easier it has made your life as a designer and wonder why you held out for so long. 

In fact if you go and build a couple of full, really nicely styled sites using modern standards-based XHTML & CSS and you don't love how much cleaner your code is and how much easier it is for you to lay it out and update it, I will paypal you 5 bucks.  HTML styling and layout is not only not good enough, it's just backward at this point. :D

Oh yeah you gotta understand when people say CSS, not HTML, they are not implying that HTML is not to be used.  HTML's point is to describe content and it will always be present unless some new markup language comes along in the future.  You still want to use HTML for all kinds of things; for lists, to define separate blocks of content, even to display tabular data inside a table.  You just don't use it to tell the browser what color, size, font or position things should be in.
 

e

Sponsor

Read Zeldman's Designing With Web Standards, Second Edition. Then make love to it.

But seriously, here's a couple of articles on why to use web standards, as opposed to HTML formatting tags :

10 Reason to Learn and Use Web Standards
Ryan Brill on Web Standards

HTML means HyperText Markup Link, right? And you're aware it is a child of the SGML project, correct? Then why aren't more people using HTML as what it is truly intended to be, a markup language? It should be describing the structure of your document, what is in it, its content, how it is organized and divided; not what color it is, not the pretty, oh so pretty special effects.

As for browser compatibility, IE introduced what we call version switching; this feature is intended to make sure that a site which displays correctly in IE6 or IE7 will be displayed the SAME way in IE32, but sites made for IE32 will not be displayed correctly in IE7, of course. More at ALA
 

___

Sponsor

Yeah, that's the theory, but quirks mode doesn't always render reliably and Microsoft doesn't always care to make sure of it.  Remember the border box model problem, or the massive variety of IE5 & IE6 hacks that everyone used to use, and how they got half patched and half left alone, so that by the time a couple years or so had passed and the exact IE6 version was no longer predictable a given feature or hack may or may not work the way you expect, let alone IE on the Mac, which was technically entirely different software and... agh.  That's not even to mention all the IE extensions (granted most of them are CSS).

Oh yeah, Andy Clarke of ALA wrote Transcending CSS: The Fine Art of Web Design, another excellent book on web standards, my personal bible.  It's on Safari Books Online if you have it (totally worth the 20 bucks / month).  I was going to link that same exact ALA article, then I noticed your link at the last moment hidden there at the end :)

Anyway we should open a new thread if we're gonna continue this.

Oh yeah, hypertext markup language >:D
 
well, to be honest, i don't wish to learn a new method of doing what i already know how to do just because theres something better, or because support for certain tags i'm using may or may not get canned some time in the future.

whether or not my coding looks 'professional' isn't important to me. as long as the actual presentation is the way i want it (and it is =D) i'm content. if it at least looks like i know what i'm doing to the average internet user, and not someone who's going to open up the source code, then i've achieved my goal.

in the event that my layout becomes buggy due to dropped support for some of the code i'm using, then i probably won't even feel like learning anything new. most likely, if i even care enough about any a site, i'll just ask someone else to do it. web design isn't really something i enjoy, or care about being proficient with. it's just something i picked up when i was 12.


btw i'm not trying to knock CSS. its obviously more powerful/precise than html. im simply expressing that i dont quite care enough about web design to learn it.
 

___

Sponsor

Well with one last final *cringe* at the thought of the effort you're wasting, I will bid you good luck with your website, sir!  :D
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top