CSS Issue with positioning text

Thread Solved

Join Date: Mar 2007
Posts: 36
Reputation: Robtyketto is an unknown quantity at this point 
Solved Threads: 0
Robtyketto Robtyketto is offline Offline
Light Poster

CSS Issue with positioning text

 
0
  #1
Nov 7th, 2008
Greetings,

I have a css file (See below) which has setting for THREE divisions "centercol", "leftcol" and "footer".

The stylesheet works fine until I add an image to the division (leftcol).

The settings get applied to the the footer division as printed at text is printed at the bottom of the page, however it appears the text appears in the centre of the page as if using the centercol settings.

I have tried adding a float setting to the division footer settings too without any luck.
Included code for the xhtml with the problem.

Can anyone help in getting the footer printer at the bottom left of the page?
The stylesheet works on another page but that doesnt use the division leftcol.

Hope this is enough information, thanks.

Note: Not sure why the text doesnt appear tabbed correctly, looks ok in my editor???

HTML and CSS Syntax (Toggle Plain Text)
  1. body
  2. {
  3. background-image:url('primirahols.jpg');
  4. background-repeat:no-repeat;
  5. }
  6.  
  7. th
  8. {
  9. font-family: Times New Roman;
  10. font-size: 18px;
  11. }
  12.  
  13. #centercol {
  14. margin: 0 210px 0 210px;
  15. }
  16.  
  17. #leftcol {
  18. float: left;
  19. width: 200px;
  20. }
  21.  
  22. #footer {
  23. float: left;
  24. position: absolute;
  25. bottom: 0;
  26. text-align: center;
  27. }
  28.  
  29. a:link
  30. {
  31. color: #000000;
  32. font-weight: bold;
  33. text-decoration: none;
  34. }
  35.  
  36. a:visited {
  37. color: #000000;
  38. text-decoration: none;
  39. }
  40. a:hover {
  41. font-weight: bold;
  42. color: #0033ff;
  43. text-decoration: none;
  44. }
  45.  
  46. a:active {
  47. text-decoration: none;
  48. }

HTML and CSS Syntax (Toggle Plain Text)
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3.  
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5.  
  6. <head>
  7. <title>America</title>
  8.  
  9. <meta name="author" content="Rob" />
  10. <meta name="description" content="Primira Holiday website" />
  11. <meta name="keywords" content="Primial Holidays Europe America Africa" />
  12.  
  13. <link rel="stylesheet" type="text/css" href="style.css" />
  14. </head>
  15.  
  16. <body>
  17.  
  18. <div align="left">
  19. <img alt="primira logo" src="primiralogo.gif" id="logo" />
  20.  
  21. <table width="100%" border="0" cellspacing="0" summary="">
  22. <tr>
  23. <th align="center"> <a href="index.htm" id="America">Return to Homepage</a></th>
  24. </tr>
  25. </table>
  26. <hr />
  27. </div>
  28.  
  29. <div id="leftcol">
  30. <img alt="New York" src="newyork.jpg" id="newyork" width="200" height="400"/>
  31. </div>
  32.  
  33. <div id="centercol">
  34. <h2>America</h2>
  35.  
  36. <table width="100%" border="1" cellspacing="0" summary="">
  37. <tr>
  38. <th align="left">Column1</th>
  39. <th align="left">Column2</th>
  40. <th align="left">Column3</th>
  41. </tr>
  42.  
  43. <tr>
  44. <td>Data 1</td>
  45. <td>Data 2</td>
  46. <td>Data 3</td>
  47. </tr>
  48.  
  49. </table>
  50. </div>
  51.  
  52. <div id="footer">
  53. <p>Author: <b>Rob</b> Last updated on <b>07 November 2008 18:49:04</b></p>
  54. </div>
  55.  
  56. </body>
  57.  
  58. </html>
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 89
Reputation: wickedsunny is an unknown quantity at this point 
Solved Threads: 4
wickedsunny wickedsunny is offline Offline
Junior Poster in Training

Re: CSS Issue with positioning text

 
0
  #2
Nov 7th, 2008
ok buddy i have gone through ur design the first and main thing which u shud know is that u shud start working inside a main continer or div. we don't start directly on a page. that is th only problem . put ur contest inside a main div they will be fine ok.
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 36
Reputation: Robtyketto is an unknown quantity at this point 
Solved Threads: 0
Robtyketto Robtyketto is offline Offline
Light Poster

Re: CSS Issue with positioning text

 
0
  #3
Nov 7th, 2008
Sorted out tabbing and reset style settings within a break

  1. #footerbr {
  2. clear: both;
  3. }

Happy!
Last edited by peter_budo; Nov 9th, 2008 at 5:29 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 745 | Replies: 2
Thread Tools Search this Thread



Tag cloud for HTML and CSS
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC