Treating an image with <div> tags like a normal image

This is a discussion on "Treating an image with <div> tags like a normal image" within the Web Page Design section. This forum, and the thread "Treating an image with <div> tags like a normal image are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Mar 1st, 2008, 11:25
New Member
Join Date: Dec 2007
Location: Glasgow
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Treating an image with <div> tags like a normal image

Hi,

I'm trying to use some styling on my web page to allow me to have rounded corners on frames for my images. The problem is that my webpage is built on allowing contributors to supply BBCODE which I then convert into the webpage so I need to allow flexibility on my placements of things.

So with this in mind I'm trying to work out how to move images around that are contained in <DIV> tags for the rounded corners that behave in the ways you'd expect when inserted into text. Have you any ideas?

I can center them, float them left and right and put a few on the same line. But when I try to just add one into the middle of text like a normal image it shoves all the text off the line.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Mar 1st, 2008, 12:34
Aso's Avatar
Aso Aso is offline
Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,339
Blog Entries: 2
Thanks: 11
Thanked 49 Times in 46 Posts
Re: Treating an image with <div> tags like a normal image

I'm not quite sure what you mean? Could you post your code so we can take a look. Or even better, have you got a link to the work-in-progress?
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Mar 1st, 2008, 15:28
New Member
Join Date: Dec 2007
Location: Glasgow
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Treating an image with <div> tags like a normal image

There's no point in posting my code it's too complicated and wont make anything any clearer. So let me explain further. To get rounded corners on my images borders I need to use a block of code like:

Code: Select all
	<div id="box01">				

		<!--- box border -->
		<div id="lb01">
		<div id="rb01">
		<div id="bb01"><div id="blc01"><div id="brc01">
		<div id="tb01"><div id="tlc01"><div id="trc01">
		<!--  -->
		<div id="content01">
			<img src="xyz" />
		</div>	
		</div>	
		</div>			
		<!--- end of box border -->
		</div></div></div></div>
		</div></div></div></div>
		<!-- -->
		
	</div>
Depending on how the user enters his bbcode he would produce HTML like:

<div style="float: left;"><img src="xyz" /></div>Text flows to the right of the image down the page. This can be achieved in a similar manner using the 'float: left' style on the outer div.

Text flows to the left of the image down the page. This can be achieved in a similar manner using the 'float: right' style on the outer div.
<div style="float: right;"><img src="xyz" /></div>


<div style="text-align: center;"><img src="xyz" /></div>
can be achieved by using cleaver margins set to auto


<div style="text-align: center;"><img src="xyz" /></div>&nbsp;<img src="xyz" /></div>
Two images displayed side by side. More difficult. Can be achieved using a wrapper tag with 'display: table' and 'zindex:1' set.


Now this is where it no longer works. This text should have an image
<img src="xyz" /> embedded into the middle of it. But when I try this with divs it always appears on a separate line with the text above and below it.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] multiple image rollover not restoring image snappy JavaScript Forum 4 Nov 5th, 2007 14:38
Image "Alt" tags not working terrycr Web Page Design 35 May 24th, 2007 00:33
Image gallery not displaying enlarged image AdRock PHP Forum 15 Sep 1st, 2006 11:31
Background image overlaping footer image at bottom of div lw_d Web Page Design 4 Mar 21st, 2006 00:27


All times are GMT. The time now is 23:29.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42