position of text within div tag

This is a discussion on "position of text within div tag" within the Web Page Design section. This forum, and the thread "position of text within div tag are both part of the Design Your Website category.



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

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 23rd, 2007, 22:41
SuperMember

SuperMember
Join Date: Apr 2007
Location: UK
Age: 31
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
position of text within div tag

Hi All

http://uk.geocities.com/johnson463@btinternet.com/

In the above link, the flash animation and text "this is some text" is held within a div called #middlecontainer.

I would like to know how i position my text at the top of the division to the right of the Flash object instead of it's current position at the bottom. Whatever changes I make to the CSS affects the Flash as well because they are in the same div.
Reply With Quote

  #2 (permalink)  
Old Apr 24th, 2007, 11:01
Junior Member
Join Date: Apr 2007
Location: London, England
Age: 22
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Re: position of text within div tag

Why not add another div...
Code: Select all
<div id="middlecontainer">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="365" height="255">
<param name="movie" value="Untitled-5.swf" />
<param name="quality" value="high" />
<embed src="Untitled-5.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="365" height="255"></embed> 
</object>This is some text
</div>
Change to

Code: Select all
<div id="middlecontainer">
 <div id="left">
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="365" height="255">
    <param name="movie" value="Untitled-5.swf" />
    <param name="quality" value="high" />
    <embed src="Untitled-5.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="365" height="255"></embed>   
    </object>
 </div>
 <div id="right">
   <p>This is some text</p>
 </div>
</div>
Your CSS would then need.
Code: Select all
#middlecontainer #left {float:left;}

Last edited by karinne; Apr 24th, 2007 at 12:17. Reason: Please use [code]...[/code] tags when displaying code!
Reply With Quote
  #3 (permalink)  
Old Apr 24th, 2007, 12:26
SuperMember

SuperMember
Join Date: Apr 2007
Location: UK
Age: 31
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
Re: position of text within div tag

I tried that code and added the rule to the CSS but the whole middlecontainer div aligns to the left of the page.

Also, you said add a division called #left but in the HTML you also referrenced a div called #right so does this mean we're adding 2 new divisions?
Reply With Quote
  #4 (permalink)  
Old Apr 24th, 2007, 12:42
Junior Member
Join Date: Feb 2006
Location: Florence - Italy
Age: 22
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Re: position of text within div tag

For example if you want the two div's side by side apply the float:left propriety to both the id's.

If you want them at the opposite sides apply float:left to #left and float:right to #right. Remember to set the width value for both the containers.
Reply With Quote
  #5 (permalink)  
Old Apr 24th, 2007, 23:04
SuperMember

SuperMember
Join Date: Apr 2007
Location: UK
Age: 31
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
Re: position of text within div tag

Thanks guys, had a play with your suggestions and sussed it out.

Rgs, Craig
Reply With Quote
Reply

Tags
div, position, text

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
making text field text disapear Phixon JavaScript Forum 4 Feb 2nd, 2008 07:49
[SOLVED] Image with text -&gt; text with background alexgeek Web Page Design 5 Nov 13th, 2007 23:25
Text position inside DIV element. Monie Web Page Design 6 Sep 13th, 2007 13:14
text position bean_2k1 Web Page Design 2 May 13th, 2006 21:58
Help with position tunafishy Web Page Design 1 Jul 26th, 2005 03:14


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


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs 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 43