CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 25th, 2013, 10:44 PM
jtorral jtorral is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 3 jtorral User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 48 m 21 sec
Reputation Power: 0
Unhappy Help with css and text (bar graphs)

I have this bit of code which generates a horizontal graph. It uses an image for a background and sets the width to a percentage based on a variable I use

Here is the php code

PHP Code:
echo "<div style='width:500px;'>";
foreach(
$choicearray as $key => $val1) {
   
$pp "{$percentagearray[$key]}%";

   echo 
"<div class='graph' style='width: $pp;'></div>";
}
echo 
"</div>"


with the following css

.graph {
position: relative;
display: block;
height: 10px;
margin: 0 0 5px;
background-image: url("images/bluebar.gif");
}


It generates the image at the link

Well, I cant attach an image or a url. Thats kind of bogus Maybe you can make it out form this

zeissimages dot com /gallery/4/U4I1361854982.SEQ.0.jpg

My problem is that I am trying to add text before each graph line and whenever I do, the text is overlapped by the image r on a new line. I just want it to look something like this

text for graph 1 ----------------------------------------
text for graph 2 -------------------------
text for graph 3 ---------


can you help please ?

Reply With Quote
  #2  
Old February 26th, 2013, 03:48 PM
Nanomech's Avatar
Nanomech Nanomech is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2011
Location: The Pleiades
Posts: 192 Nanomech User rank is Sergeant (500 - 2000 Reputation Level)Nanomech User rank is Sergeant (500 - 2000 Reputation Level)Nanomech User rank is Sergeant (500 - 2000 Reputation Level)Nanomech User rank is Sergeant (500 - 2000 Reputation Level)Nanomech User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 23 h 7 m 18 sec
Reputation Power: 7
Send a message via Skype to Nanomech
Float each piece of text left. That's all I can think of. If using a <p> tag for the text, declare a standard width for the <p>'s.

Regards,

NM.
__________________
"WERE NOT WORTHY!"
"WERE NOT WORTHY!"

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Help with css and text (bar graphs)

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap