943,815 Members | Top Members by Rank

Ad:
Feb 15th, 2009
0

Is there an easier way? =P

Expand Post »
Hello. I am coding a website that is using a single CSS file that all pages reference. My problem is that each page is a drastically different length.

I have colored bars going down the sides, and there are lots of them. I have tried setting all the colored bars to 100%, and the main content div to 100% as well, but no matter what I do I can't seem to get the colored bars to go down the entire length of the page.

I know I could just have an internal css file for each page, but that would be too inconvenient. Of course, if there is no other way, ill have to do that. =D

So my question is: Is there a way to have my colored bars go the entire length of my content, even though the content on my pages is different lengths?

Thanks much!
Similar Threads
Reputation Points: 10
Solved Threads: 1
Newbie Poster
SmartBeaver is offline Offline
14 posts
since Jan 2009
Feb 15th, 2009
0

Re: Is there an easier way? =P

How have you made the colored bars
Show code
Reputation Points: 562
Solved Threads: 368
Posting Maven
almostbob is offline Offline
2,970 posts
since Jan 2009
Feb 15th, 2009
0

Re: Is there an easier way? =P

HTML and CSS Syntax (Toggle Plain Text)
  1. div#trans2 { background: #080000;
  2. width: 1.1%;
  3. height: 80ex;
  4. position: absolute;
  5. top: 0px;
  6. left: 0;
  7. }
  8. div#trans3 { background: #100000;
  9. width: 1.1%;
  10. height: 80ex;
  11. position: absolute;
  12. top: 0px;
  13. left: .9%;
  14. }
  15. div#trans4 { background: #180000;
  16. width: 1.1%;
  17. height: 80ex;
  18. position: absolute;
  19. top: 0px;
  20. left: 1.8%;
  21. }
  22. div#trans5 { background: #200000;
  23. width: 1.2%;
  24. height: 80ex;
  25. position: absolute;
  26. top: 0px;
  27. left: 2.6%;
  28. }
  29.  
  30. div#trans6 { background: #280000;
  31. width: .9%;
  32. height: 80ex;
  33. position: absolute;
  34. top: 0px;
  35. left: 3.4%;
  36. }
  37. div#trans7 { background: #300000;
  38. width: 1.1%;
  39. height: 80ex;
  40. position: absolute;
  41. top: 0px;
  42. left: 4.2%;
  43. }
  44. div#trans8 { background: #380000;
  45. width: 1.1%;
  46. height: 80ex;
  47. position: absolute;
  48. top: 0px;
  49. left: 5%;
  50. }
  51. div#trans9 { background: #400000;
  52. width: 1.1%;
  53. height: 80ex;
  54. position: absolute;
  55. top: 0px;
  56. left: 5.9%;
  57. }
  58. div#trans10 { background: #480000;
  59. width: 1.1%;
  60. height: 80ex;
  61. position: absolute;
  62. top: 0px;
  63. left: 6.8%;
  64. }
  65. div#trans11 { background: #500000;
  66. width: 1.1%;
  67. height: 80ex;
  68. position: absolute;
  69. top: 0px;
  70. left: 7.7%;
  71. }
  72. div#trans12 { background: #580000;
  73. width: 1.1%;
  74. height: 80ex;
  75. position: absolute;
  76. top: 0px;
  77. left: 8.6%;
  78. }
  79. div#trans13 { background: #600000;
  80. width: 1.1%;
  81. height: 80ex;
  82. position: absolute;
  83. top: 0px;
  84. left: 9.5%;
  85. }
  86. div#trans14 { background: #680000;
  87. width: 1.1%;
  88. height: 80ex;
  89. position: absolute;
  90. top: 0px;
  91. left: 10.4%;
  92. }
  93. div#trans15 { background: #700000;
  94. width: 1.1%;
  95. height: 80ex;
  96. position: absolute;
  97. top: 0px;
  98. left: 11.3%;
  99. }
  100. div#trans16 { background: #780000;
  101. width: 1.1%;
  102. height: 80ex;
  103. position: absolute;
  104. top: 0px;
  105. left: 12.2%;
  106. }
  107. div#trans17 { background: #800000;
  108. width: 1%;
  109. height: 80ex;
  110. position: absolute;
  111. top: 0px;
  112. left: 13.1%;
  113. }
  114. div#trans18 { background: #880000;
  115. width: 1%;
  116. height: 80ex;
  117. position: absolute;
  118. top: 0px;
  119. left: 14%;
  120. }
  121. div#trans19 { background: #900000;
  122. width: 1.1%;
  123. height: 80ex;
  124. position: absolute;
  125. top: 0px;
  126. left: 14.9%;
  127. }
  128. div#trans20 { background: #980000;
  129. width: 1%;
  130. height: 80ex;
  131. position: absolute;
  132. top: 0px;
  133. left: 15.8%;
  134. }
  135. div#trans21 { background: #A00000;
  136. width: 1%;
  137. height: 80ex;
  138. position: absolute;
  139. top: 0px;
  140. left: 16.7%;
  141. }
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149. div#minitrans1 {background: #980000;
  150. width: .9%;
  151. height: 100px;
  152. position: absolute;
  153. top: 0;
  154. left: 17.6%;
  155. }
  156. div#minitrans2 {background: #900000;
  157. width: .9%;
  158. height: 100px;
  159. position: absolute;
  160. top: 0;
  161. left: 18.4%;
  162. }
  163. div#minitrans3 {background: #880000;
  164. width: .9%;
  165. height: 100px;
  166. position: absolute;
  167. top: 0;
  168. left: 19.2%;
  169. }
  170. div#minitrans4 {background: #800000;
  171. width: .9%;
  172. height: 100px;
  173. position: absolute;
  174. top: 0;
  175. left: 20%;
  176. }
  177. div#minitrans5 {background: #780000;
  178. width: .9%;
  179. height: 100px;
  180. position: absolute;
  181. top: 0;
  182. left: 20.8%;
  183. }
  184. div#minitrans6 {background: #700000;
  185. width: .9%;
  186. height: 100px;
  187. position: absolute;
  188. top: 0;
  189. left: 21.6%;
  190. }
  191. div#minitrans7 {background: #680000;
  192. width: .9%;
  193. height: 100px;
  194. position: absolute;
  195. top: 0;
  196. left: 22.4%;
  197. }
  198. div#minitrans8 {background: #600000;
  199. width: .9%;
  200. height: 100px;
  201. position: absolute;
  202. top: 0;
  203. left: 23.2%;
  204. }
  205. div#minitrans9 {background: #580000;
  206. width: .9%;
  207. height: 100px;
  208. position: absolute;
  209. top: 0;
  210. left: 24%;
  211. }
  212. div#minitrans10 {background: #500000;
  213. width: .9%;
  214. height: 100px;
  215. position: absolute;
  216. top: 0;
  217. left: 24.8%;
  218. }
  219. div#minitrans11 {background: #480000;
  220. width: .9%;
  221. height: 100px;
  222. position: absolute;
  223. top: 0;
  224. left: 25.6%;
  225. }
  226. div#minitrans12 {background: #400000;
  227. width: .9%;
  228. height: 100px;
  229. position: absolute;
  230. top: 0;
  231. left: 26.4%;
  232. }
  233. div#minitrans13 {background: #380000;
  234. width: .9%;
  235. height: 100px;
  236. position: absolute;
  237. top: 0;
  238. left: 27.2%;
  239. }
  240. div#minitrans14 {background: #300000;
  241. width: 1%;
  242. height: 100px;
  243. position: absolute;
  244. top: 0;
  245. left: 28%;
  246. }
  247. div#minitrans15 {background: #280000;
  248. width: 1%;
  249. height: 100px;
  250. position: absolute;
  251. top: 0;
  252. left: 28.8%;
  253. }
  254. div#minitrans16 {background: #200000;
  255. width: 1%;
  256. height: 100px;
  257. position: absolute;
  258. top: 0;
  259. left: 29.6%;
  260. }
  261. div#minitrans17{background: #180000;
  262. width: 1%;
  263. height: 100px;
  264. position: absolute;
  265. top: 0;
  266. left: 30.4%;
  267. }
  268. div#minitrans18 {background: #100000;
  269. width: 1%;
  270. height: 100px;
  271. position: absolute;
  272. top: 0;
  273. left: 31.2%;
  274. }
  275.  
  276.  
  277.  
  278. div#hder {background: #080000;
  279. width: 35.9%;
  280. height: 100px;
  281. position: absolute;
  282. top: 0;
  283. left: 31.9%;
  284. }
  285.  
  286.  
  287. div#rminitrans18 {background: #100000;
  288. width: 1%;
  289. height: 100px;
  290. position: absolute;
  291. top: 0;
  292. left: 67%;
  293. }
  294. div#rminitrans17 {background: #180000;
  295. width: 1%;
  296. height: 100px;
  297. position: absolute;
  298. top: 0;
  299. left: 67.8%;
  300. }
  301. div#rminitrans16 {background: #200000;
  302. width: 1%;
  303. height: 100px;
  304. position: absolute;
  305. top: 0;
  306. left: 68.6%;
  307. }
  308. div#rminitrans15 {background: #280000;
  309. width: 1%;
  310. height: 100px;
  311. position: absolute;
  312. top: 0;
  313. left: 69.4%;
  314. }
  315. div#rminitrans14 {background: #300000;
  316. width: 1%;
  317. height: 100px;
  318. position: absolute;
  319. top: 0;
  320. left: 70.2%;
  321. }
  322. div#rminitrans13 {background: #380000;
  323. width: 1%;
  324. height: 100px;
  325. position: absolute;
  326. top: 0;
  327. left: 70.9%;
  328. }
  329. div#rminitrans12 {background: #400000;
  330. width: 1%;
  331. height: 100px;
  332. position: absolute;
  333. top: 0;
  334. left: 71.8%;
  335. }
  336. div#rminitrans11 {background: #480000;
  337. width: 1%;
  338. height: 100px;
  339. position: absolute;
  340. top: 0;
  341. left: 72.6%;
  342. }
  343. div#rminitrans10 {background: #500000;
  344. width: 1%;
  345. height: 100px;
  346. position: absolute;
  347. top: 0;
  348. left: 73.4%;
  349. }
  350. div#rminitrans9 {background: #580000;
  351. width: 1%;
  352. height: 100px;
  353. position: absolute;
  354. top: 0;
  355. left: 74.2%;
  356. }
  357. div#rminitrans8 {background: #600000;
  358. width: 1%;
  359. height: 100px;
  360. position: absolute;
  361. top: 0;
  362. left: 75%;
  363. }
  364. div#rminitrans7 {background: #680000;
  365. width: 1%;
  366. height: 100px;
  367. position: absolute;
  368. top: 0;
  369. left: 75.8%;
  370. }
  371. div#rminitrans6 {background: #700000;
  372. width: 1%;
  373. height: 100px;
  374. position: absolute;
  375. top: 0;
  376. left: 76.6%;
  377. }
  378. div#rminitrans5 {background: #780000;
  379. width: 1%;
  380. height: 100px;
  381. position: absolute;
  382. top: 0;
  383. left: 77.4%;
  384. }
  385. div#rminitrans4 {background: #800000;
  386. width: 1.1%;
  387. height: 100px;
  388. position: absolute;
  389. top: 0;
  390. left: 78.2%;
  391. }
  392. div#rminitrans3 {background: #880000;
  393. width: 1.1%;
  394. height: 100px;
  395. position: absolute;
  396. top: 0;
  397. left: 79%;
  398. }
  399. div#rminitrans2 {background: #900000;
  400. width: 1.1%;
  401. height: 100px;
  402. position: absolute;
  403. top: 0;
  404. left: 79.8%;
  405. }
  406. div#rminitrans1 {background: #980000;
  407. width: 1.1%;
  408. height: 100px;
  409. position: absolute;
  410. top: 0;
  411. left: 80.6%;
  412. }
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421. div#rtrans21 { background: #A00000;
  422. width: 1%;
  423. height: 80ex;
  424. position: absolute;
  425. top: 0px;
  426. left: 81.5%;
  427. }
  428. div#rtrans20 { background: #980000;
  429. width: 1%;
  430. height: 80ex;
  431. position: absolute;
  432. top: 0px;
  433. left: 82.3%;
  434. }
  435. div#rtrans19 { background: #900000;
  436. width: 1%;
  437. height: 80ex;
  438. position: absolute;
  439. top: 0px;
  440. left: 83.1%;
  441. }
  442. div#rtrans18 { background: #880000;
  443. width: 1%;
  444. height: 80ex;
  445. position: absolute;
  446. top: 0px;
  447. left: 84%;
  448. }
  449. div#rtrans17 { background: #800000;
  450. width: 1%;
  451. height: 80ex;
  452. position: absolute;
  453. top: 0px;
  454. left: 84.9%;
  455. }
  456. div#rtrans16 { background: #780000;
  457. width: 1%;
  458. height: 80ex;
  459. position: absolute;
  460. top: 0px;
  461. left: 85.8%;
  462. }
  463. div#rtrans15 { background: #700000;
  464. width: 1.2%;
  465. height: 80ex;
  466. position: absolute;
  467. top: 0px;
  468. left: 86.7%;
  469. }
  470. div#rtrans14 { background: #680000;
  471. width: 1.2%;
  472. height: 80ex;
  473. position: absolute;
  474. top: 0px;
  475. left: 87.6%;
  476. }
  477. div#rtrans13 { background: #600000;
  478. width: 1.2%;
  479. height: 80ex;
  480. position: absolute;
  481. top: 0px;
  482. left: 88.5%;
  483. }
  484. div#rtrans12 { background: #580000;
  485. width: 1.1%;
  486. height: 80ex;
  487. position: absolute;
  488. top: 0px;
  489. left: 89.4%;
  490. }
  491. div#rtrans11 { background: #500000;
  492. width: 1.1%;
  493. height: 80ex;
  494. position: absolute;
  495. top: 0px;
  496. left: 90.3%;
  497. }
  498. div#rtrans10 { background: #480000;
  499. width: 1%;
  500. height: 80ex;
  501. position: absolute;
  502. top: 0px;
  503. left: 91.2%;
  504. }
  505. div#rtrans9 { background: #400000;
  506. width: 1.2%;
  507. height: 80ex;
  508. position: absolute;
  509. top: 0px;
  510. left: 92.1%;
  511. }
  512. div#rtrans8 { background: #380000;
  513. width: 1.1%;
  514. height: 80ex;
  515. position: absolute;
  516. top: 0px;
  517. left: 93%;
  518. }
  519. div#rtrans7 { background: #300000;
  520. width: 1.2%;
  521. height: 80ex;
  522. position: absolute;
  523. top: 0px;
  524. left: 93.9%;
  525. }
  526. div#rtrans6 { background: #280000;
  527. width: 1.3%;
  528. height: 80ex;
  529. position: absolute;
  530. top: 0px;
  531. left: 94.9%;
  532. }
  533. div#rtrans5 { background: #200000;
  534. width: 1.2%;
  535. height: 80ex;
  536. position: absolute;
  537. top: 0px;
  538. left: 95.9%;
  539. }
  540. div#rtrans4 { background: #180000;
  541. width: 1.2%;
  542. height: 80ex;
  543. position: absolute;
  544. top: 0px;
  545. left: 96.8%;
  546. }
  547. div#rtrans3 { background: #080000;
  548. width: 1.4%;
  549. height: 80ex;
  550. position: absolute;
  551. top: 0px;
  552. left: 97.7%;
  553. }
  554. div#rtrans2 { background: #000000;
  555. width: 1.4%;
  556. height: 80ex;
  557. position: absolute;
  558. top: 0px;
  559. left: 98.7%;
  560. }
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600. div#content { background: white;
  601. width: 61.7%;
  602. height: 100%;
  603. position: absolute;
  604. top: 100px;
  605. left: 18.7%;
  606. font-family: Comic Sans MS;
  607. font-size: 1.1em;
  608. }
  609.  
  610.  
  611. a:link {color: 1859B4; }
  612.  
  613. a:hover {color: E7AE00; text-decoration: none; }
  614.  
  615. a:visited {color: 800000; }

The "trans" are my colored bars. =D
Reputation Points: 10
Solved Threads: 1
Newbie Poster
SmartBeaver is offline Offline
14 posts
since Jan 2009
Feb 17th, 2009
0

Re: Is there an easier way? =P

Hi,

Could you post the HTML as well. Would like to see how you nested your divs.

And as for your Styles... Wow, sure there would be a WAY easier way to achieve what you trying to do.

Let em see how it looks, post the html and we will take it from there.
Reputation Points: 46
Solved Threads: 48
Posting Pro in Training
macneato is offline Offline
413 posts
since Jun 2007
Feb 17th, 2009
1

Re: Is there an easier way? =P

0px is an invalid style. Place units of measure on nonzero values that need them. Do not place units of measure on zero values. It causes some browsers to throw the entire style away.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
Feb 19th, 2009
0

Re: Is there an easier way? =P

Sounds a little like you are having a similar problem to me.

I had 3 columns in my page (div elements) of a specified width. The columns can have different amounts of text in them, so I didn't specify a height, I let that be fluid, but I needed all columns to extend to the same height as the longest column.

I posted a link to my solution here:

http://www.daniweb.com/forums/thread176880.html
Reputation Points: 10
Solved Threads: 0
Newbie Poster
FraserM is offline Offline
4 posts
since Feb 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: Expand 3 Divs together
Next Thread in HTML and CSS Forum Timeline: Question About Dreamweaver CS3 / Menus?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC