Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > HTML / XHTML
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 11-04-2009, 10:09 AM
  #1
Code_worm
Aspirant (Level 2)
 
Join Date: Oct 2009
Location: scotland
Posts: 15
iTrader: (0)
Code_worm is an unknown quantity at this point
Division text spacing and color problems

Having a problem with divisions, as far as i am aware the contents of a division portrays the length of any division. Correct? Is there any way i can make the division wider to enable me to have space either side of my text?

Thanks CW
Code_worm is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-04-2009, 11:19 AM
  #2
Pegasus
Mama Hen
 
Pegasus's Avatar
 
Join Date: Nov 2001
Location: 35º South of Santa Claus
Posts: 22,362
iTrader: (0)
Pegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to all
Add more padding to the sides of the div.
__________________


Decaf is the root of all evil...
HTMLForums Awards 2008
Pegasus is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-04-2009, 11:39 AM
  #3
¥åßßå
Blonde Bimbo
 
¥åßßå's Avatar
 
Join Date: Jul 2004
Posts: 2,415
iTrader: (0)
¥åßßå is a name known to all¥åßßå is a name known to all¥åßßå is a name known to all¥åßßå is a name known to all¥åßßå is a name known to all¥åßßå is a name known to all
Or margins, if you don't have borders/background on the div

¥
__________________
I may have opened the door, but you entered of your own free will

¥åßßå is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-04-2009, 12:30 PM
  #4
Code_worm
Aspirant (Level 2)
 
Join Date: Oct 2009
Location: scotland
Posts: 15
iTrader: (0)
Code_worm is an unknown quantity at this point
Thanks, i added padding. pretty new to html so you'll have to bare with me guys haha.

Another question for you guys if you don't mind..
I have set up a div with external css styles and when i set the div bg color i cant see my text within the div... any ideas? i made sure my text color of the paragraph tag was set in the external css aswell
Code_worm is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-04-2009, 12:37 PM
  #5
Pegasus
Mama Hen
 
Pegasus's Avatar
 
Join Date: Nov 2001
Location: 35º South of Santa Claus
Posts: 22,362
iTrader: (0)
Pegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to all
How did you write the text colour? It should be just color: #123abc; not font-color or text-color.
__________________


Decaf is the root of all evil...
HTMLForums Awards 2008
Pegasus is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-04-2009, 12:42 PM
  #6
Code_worm
Aspirant (Level 2)
 
Join Date: Oct 2009
Location: scotland
Posts: 15
iTrader: (0)
Code_worm is an unknown quantity at this point
HTML:
HTML Code:
<body>

<p>
<a href="http://www.rgu.ac.uk/prospectus/disp_ProspectusEntry.cfm?CourseID=BSCMIM&amp;year=2008">BSc (Hons) Computing for Internet and Multimedia</a>  Sept 2009 </p>
<!-- URL for relevant prospectus-->

<div class="year1">
    <p>    Year one   </p>
    </div>

<div class="year1">
</div>

</body>

External CSS

HTML Code:
body { background-color: white;}

div.year1 {
	  background-color:#0000FF;
	  border: thin groove; 
	  border-width: thin;
	  text-align:center;
	  height:40px;
	  width: 150px;
	  top:100px;
	  left:200px;
	  position:absolute;
	  font-size:16pt; }

p {  color:#000000; }
Code_worm is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-04-2009, 12:45 PM
  #7
Pegasus
Mama Hen
 
Pegasus's Avatar
 
Join Date: Nov 2001
Location: 35º South of Santa Claus
Posts: 22,362
iTrader: (0)
Pegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to all
Try putting the colour information inside the div, rather than as a separate piece.
__________________


Decaf is the root of all evil...
HTMLForums Awards 2008
Pegasus is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-04-2009, 12:48 PM
  #8
Code_worm
Aspirant (Level 2)
 
Join Date: Oct 2009
Location: scotland
Posts: 15
iTrader: (0)
Code_worm is an unknown quantity at this point
Yeah i already tried taking it out of the paragraph tags and inserting a text color style in the div, still no joy though...
Code_worm is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-04-2009, 02:27 PM
  #9
Pegasus
Mama Hen
 
Pegasus's Avatar
 
Join Date: Nov 2001
Location: 35º South of Santa Claus
Posts: 22,362
iTrader: (0)
Pegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to all
What happens when you remove the colour information altogether? You're doing black text which is the default setting.
__________________


Decaf is the root of all evil...
HTMLForums Awards 2008
Pegasus is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-04-2009, 02:32 PM
  #10
Code_worm
Aspirant (Level 2)
 
Join Date: Oct 2009
Location: scotland
Posts: 15
iTrader: (0)
Code_worm is an unknown quantity at this point
Yeh thats why i put in the color style because there was no text showin....
Totally lost as to what to do haha
Code_worm is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-04-2009, 03:06 PM
  #11
Pegasus
Mama Hen
 
Pegasus's Avatar
 
Join Date: Nov 2001
Location: 35º South of Santa Claus
Posts: 22,362
iTrader: (0)
Pegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to all
Can you post a link to the page? It'll help me see what's going on.
__________________


Decaf is the root of all evil...
HTMLForums Awards 2008
Pegasus is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-04-2009, 04:23 PM
  #12
Code_worm
Aspirant (Level 2)
 
Join Date: Oct 2009
Location: scotland
Posts: 15
iTrader: (0)
Code_worm is an unknown quantity at this point
How can i post a link to the page? Sorry are u presuming that its already online?
Code_worm is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-05-2009, 02:51 AM
  #13
Pegasus
Mama Hen
 
Pegasus's Avatar
 
Join Date: Nov 2001
Location: 35º South of Santa Claus
Posts: 22,362
iTrader: (0)
Pegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to all
I need to see more of the code than just that little bit. From the sounds of it, you're missing something else other than just the code for colours.
__________________


Decaf is the root of all evil...
HTMLForums Awards 2008
Pegasus is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-05-2009, 05:59 AM
  #14
Code_worm
Aspirant (Level 2)
 
Join Date: Oct 2009
Location: scotland
Posts: 15
iTrader: (0)
Code_worm is an unknown quantity at this point
I have added more divisions since the previous code
HTML
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">

<html>

<head>

<style type="text/css">
div.year1 {background-color:#B0E0E6;color:#000000;}
div.year2 {background-color:#40E0D0;color:#000000;}
div.year3 {background-color:#1E90FF;color:#000000;}
div.year4 {background-color:#0000FF;color:#000000;}
<!-- use multiple selectors-->

</style>

<LINK href="coursestyles.css" title="css" rel="stylesheet" type="text/css">

<meta http-equiv="Content-type"content="text/html;charset=UTF-8">
<meta name="author" content="Philip Rennie">

<title>BSc (Hons) Computing for Internet and Multimedia Coursemap</title>

</head>



<body>


<p class="one"><a href="http://www.rgu.ac.uk/prospectus/disp_ProspectusEntry.cfm?CourseID=BSCMIM&amp;year=2008">BSc (Hons) Computing for Internet and Multimedia</a></p>
<!-- URL for relevant prospectus-->
<p class="one"> Sept 2009 </p>


<div class="year1">
     Year one
    </div>

<div class="year1">
</div>

<div class="year2">
     Year two
    </div>

<div class="year2">
</div>

<div class="year3">
     Year three
    </div>

<div class="year3">
</div>

<div class="year4">
     Year four
    </div>

<div class="year4">
</div>

</body>

</html>
CSS
HTML Code:
body { background-color: white;}
p.one{text-align:center;}
div.year1 {
	  border: thin groove; 
	  border-width: thin;
	  text-align:center;
	  height:30px;
	  width: 150px;
	  top:100px;
	  left:200px;
	  position:absolute;
	  font-size:16pt; }
div.year2 {
	  border: thin groove; 
	  border-width: thin;
	  text-align:center;
	  height:30px;
	  width: 150px;
	  top:100px;
	  left:400px;
	  position:absolute;
	  font-size:16pt; }
div.year3 {
	  border: thin groove; 
	  border-width: thin;
	  text-align:center;
	  height:30px;
	  width: 150px;
	  top:100px;
	  left:600px;
	  position:absolute;
	  font-size:16pt; }	
div.year4 {
	  border: thin groove; 
	  border-width: thin;
	  text-align:center;
	  height:30px;
	  width: 150px;
	  top:100px;
	  left:800px;
	  position:absolute;
	  font-size:16pt; }	  
	  
	  
Code_worm is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-05-2009, 06:29 AM
  #15
Pegasus
Mama Hen
 
Pegasus's Avatar
 
Join Date: Nov 2001
Location: 35º South of Santa Claus
Posts: 22,362
iTrader: (0)
Pegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to all
Well that just frosts my backside! The code checks out as valid, both the HTML (except that they'd prefer you added character encoding) and the CSS. I'm not in the least bit sure why the colour won't show.

Let me take the "Resolved" marking off the thread and we'll see if we can get younger eyes to take a look at what we're doing.
__________________


Decaf is the root of all evil...
HTMLForums Awards 2008
Pegasus is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart



 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  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
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 08:32 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.