Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-12-2004, 10:05 AM
splinter's Avatar
WebProWorld Pro
 

Join Date: Jul 2003
Location: UK
Posts: 261
splinter RepRank 0
Default Help with floating...

On my site http://www.gamehideout.co.uk/ I am trying to get the image in the same box as "Testing, testing." while being on the right-hand side of the box (where it currently is).

Code:
<div class="context">
[img]thumb_gen.php?forum.jpg[/img]
Testing, testing. 
</div>
Code:
#content .top .context img {
border: 1px #CCCCCC dashed;
padding: 1px;
float: right;
}
What's up and how do I fix it?
Reply With Quote
  #2 (permalink)  
Old 09-12-2004, 12:57 PM
splinter's Avatar
WebProWorld Pro
 

Join Date: Jul 2003
Location: UK
Posts: 261
splinter RepRank 0
Default

It's ok. I sort of solved it:

Code:
<div class="top">

<div class="header">latest update - 12/09/04</div>

<div class="context">


This site is very incomplete but all the links work so you can take a look around. Not much content yet though.
Make sure to check out the forum as it has become very popular!</p>
[img]thumb_gen.php?forum.jpg[/img]
</div>

</div>
Code:
#content .top .context {
border: 1px #CCCCCC dashed;
border-top: 0px;
padding: 3px;
text-align:right;
}
#content .top .context img {
border: 1px #CCCCCC dashed;
padding: 1px;
margin: 3px;
}
#content .top .context p {
text-align: left;
float: left;
margin: 0px;
}
This will work until the text goes past the image.

Basically what I've done is instead of the box getting it's height from the text it is getting it from the image. If the text goes beyond the image though, the text will overflow.
Reply With Quote
  #3 (permalink)  
Old 09-12-2004, 12:58 PM
splinter's Avatar
WebProWorld Pro
 

Join Date: Jul 2003
Location: UK
Posts: 261
splinter RepRank 0
Default

Actually. I lie.

The problem I now face is the image goes beneath the text. I can't put float: right; in the image class as that brings me to the original problem.

:(
Reply With Quote
  #4 (permalink)  
Old 09-12-2004, 02:30 PM
splinter's Avatar
WebProWorld Pro
 

Join Date: Jul 2003
Location: UK
Posts: 261
splinter RepRank 0
Default

I figured it out. I'm not going to be able to tell you exactly how I did it as I made lots of little changes and I've forgotten how much different the code is.

I'll provide the two pieces of code now though for you to analyse. The main bit was to have the image tag before the text.

Code:
<div class="context">


[img]thumb_gen.php?forum.jpg[/img]
This site is very incomplete but all the links work so you can take a look around. Not much content yet though.
Make sure to check out the forum as it has become very popular!</p>
</div>
Code:
#content .top .context {
border: 1px #CCCCCC dashed;
border-top: 0px;
padding: 3px;
float: left;
margin-bottom: 5px;
}
#content .top .context img {
border: 1px #CCCCCC dashed;
padding: 1px;
margin: 3px;
float: right;
}
#content .top .context p {
margin: 0px;
}
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: ,



Thread Tools
Display Modes

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

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


Search Engine Optimization by vBSEO 3.2.0