[html+css] 2Pictures and caption - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Skype & Technology (/forumdisplay.php?fid=9) +---- Forum: Tech Talk (/forumdisplay.php?fid=17) +----- Thread: [html+css] 2Pictures and caption (/showthread.php?tid=38406) [html+css] 2Pictures and caption by user2319 on 02-13-2005 at 06:25 PM
My father has made a website, and most of it looks really nice. I told him to use stylesheets, and he listened But one problem arises when he wants to do some pictures: The pictures have some text accompanying them (my dictionary says the english word is caption..), and he wants the 2 pictures to be next to each other and have the text underneath them. He used this (yes, I know this code is really bad.. the rest is of the site is better, and has only minimal errors, which will be fixed) code:This works fine with IE6 @ 1024x768, but with any other browser, it doesn't look good. This is because my father just used some trial and error. Another problem is that he'd like to keep the lay-out in a stylesheet, and this code doesn't. My father wants it to display like this: [image1] [image2] img1txt img2txt [image3] img3txt How can he do this? He'd prefer to do it without tables, and I'd like to keep the lay-out separate (with CSS?). Any help would be appreciated edit: Made the text better edit: Made the code better readable Post Scriptum: Yes, the alt-text is bad. I've told him allready. RE: [html+css] 2Pictures and caption by RaceProUK on 02-13-2005 at 07:19 PM There's nothing wrong with using tables. Displaying the images the way you want can be classed as a structural decision, therefore tables are what to use. RE: [html+css] 2Pictures and caption by x2zen on 02-13-2005 at 07:26 PM Just set border="0" then no one will see that you are using tables. RE: [html+css] 2Pictures and caption by Chris.1 on 02-13-2005 at 07:27 PM You can't have a <div> inside a <p> tag (AFAIK anyway) - you could do it the other way around and have the <p> inside the <div> though. RE: [html+css] 2Pictures and caption by TheBlasphemer on 02-13-2005 at 07:30 PM
<div style="float: left;"> RE: [html+css] 2Pictures and caption by EGIS on 02-13-2005 at 07:56 PM
code:Set the width of the img:after to the width of the image. This only works in Opera, so it's not a good solution. Wrap the text and picture in a floated div, as others have suggested. RE: [html+css] 2Pictures and caption by albert on 02-13-2005 at 08:19 PM
honestly i used to bust my ass trying to set pictures straight with Html.. but now I just use front page a lot more simple lol RE: RE: [html+css] 2Pictures and caption by user2319 on 02-13-2005 at 08:36 PM
quote: * user2319 thinks tables are for information, not images quote:Haha quote:My father doesn't close <p>aragraphs ( HTML4 ) Thanks, TheBlasphemer quote:Still thanks, but the main public of my father's website != Opera And I don't like browser-specific solutions @lp15, I really *wouldn't* use Frontpage, or any WYSIWYG. This is what i know have. I hope it's correct (I'm kind of new to CSS ) code: RE: [html+css] 2Pictures and caption by EGIS on 02-13-2005 at 09:12 PM
Divs don't have any width attribute, put the width in the css instead. code:Then you wont need the <br />-tags either. RE: [html+css] 2Pictures and caption by TheBlasphemer on 02-13-2005 at 09:49 PM
quote: Agreed RE: RE: [html+css] 2Pictures and caption by user2319 on 02-14-2005 at 06:03 PM
quote: |