HTML & CSS
I have the following code on my site and I want to wrap the text around the img, but not sure how to narrow the side margins so that it doesn't look sparse. I want to keep the photo close to the size shown.
<center>WHAT DO YOU THINK?</center>
<p><i>I have a box of old photographs from when I was growing up in New Jersey, and one of the photographs recently caught my attention.... See if you know why?
It's from 1946, and it's a photo of my Dad and I on the beach in Atlantic City.</i></p>
<center><img src="images/AC.jpg" height="530" width="350"></center>
Can you provide a picture or link to the site where this is being implemented?
Right now, I'm very confused.
You'd have to use CSS (which it doesn't look like you're doing) and use the 'float' property.
1) This isn't 1997, which is the last time anyone had any real business using the LONG deprecated CENTER tag.
2) Looking at your site, you've failed to grasp a lot of the concepts of HTML -- like you can only have ONE body tag, not three... that in a STRICT document (which your doctype is setting) you aren't supposed to use CENTER, FONT, or any of the half dozen other tags you seem to be using. I would suspect that you are learning from a decade or more out of date source... Multiple H1's around non-heading elements, markup AFTER the HTML tag is closed -- you've basically got gibberish here... and the use of so much presentational markup makes one question why you even HAVE CSS.
Not even sure where I'd start to think about fixing that. Pretty much ALL of the markup needs to go.
Thank you deathshadow...your name is appropriate. Will see what I work out by myself or somewhere else...
@Deathshadow ... Barnum, I gather, is a hobbyist who just wants to have a few things online. He's not a web developer or anything like that, so I think it's fair enough if he wants to use older code just to get something online. It won't wreck the web. You are better off saving your bludgeon for the bigwigs who are truly dragging the web into the abyss—like that rotten HTML5 mob.
@Barnum: it isn't really clear to me what your question is. But if you want text to flow around an image, an easy solution is to place the image code inside the paragraph, and perhaps set a margin on the image to create some spacing between it and the text. E.g.
<p><img src="" alt="" style="margin: 0 20px 20px 0"> Some text</p>
Comic....Sans....ugh. I bet you couldn't find 10 web designers in 100 who use comic sans...but whatever proverbially floats your proverbial boat - or div, for that matter.
I can't see any place where your text flows around an image.
Edit: Sorry for that stupid joke. I've just been using floats a lot lately and it's kind of getting to my head...and when I saw the word float, I wanted to make some sort of pun. :/ Forgive me.
Appreciate all your comments.
Did it help?
Happy to provide
Yes, thanks. I often feel inadquate posting here given my skills, but I can always count on someone understanding and trying to help. I wish I were more saavy with all this stuff, but I am not.
So have we managed to help you this time? It doesn't look like your page has changed, but I'm not entirely sure what you were trying to do. Your site is actually quite simple (nice and linear), so it shouldn't be hard to make the required change.
Let me explain if I can....
I am an older person who wants merely put up a website that keeps me involved in a pastime I love. I took a course about four years ago at a junior college, and learned just enought to make me dangerous. I have tried to learn more since (quite often thanks to all of you) but know that what I put up in the way of code is old, not legitimate and embarrassing.
I am not sure I can offer much more in the future as I also have a few other problems I don't care to talk about. In the mean time whatever I can learn from you all is appreciated. Thank you...
Don't worry about who you are, how old or how young you may or may not be. Forums and, in particular, SPF, are open to everyone and are meant to be used by everyone.
Ask whatever you wish.
Nah, if it does what you want for your readership, it's fine.
In the mean time whatever I can learn from you all is appreciated.
Good attitude. Now, to my question though: could you explain more clearly what issue you are trying to solve in this instance? I mentioned a simple solution above, but am not sure if it answers your question.
This topic is now closed. New replies are no longer allowed.