a tags and widths of divs

a tags filling container {display: block;} and boxes not fitting

Page 1 of 1

1 Replies - 802 Views - Last Post: 20 March 2009 - 12:24 PM

#1 graphichill   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 39
  • Joined: 17-February 09

a tags and widths of divs

Posted 20 March 2009 - 08:38 AM

i have 7 boxes with a width of 131px x 7 = 917px plus 5 x 5px margins = 30px all together you get 947px, but they are not fitting, can someone help!


How do i get my a tag to fill the width "and height" of my containing box, it seem to be only filling the width.


can some one give my the code for css scroll downs for the last piece of code on this page.

Sorry im asking alot but please can someone help me?

/*main Nav*/
#main-nav{width:947px; height:37px; margin-top: 5px; list-style:none; float:left;}

ul.main-button li {height:37px; width:131px; background-image: url("../images/main-nav.jpg"); background-repeat:repeat-x; margin: 0px 5px 0px 0px; padding: 0px 0px 0px 0px; text-align: right;cursor: pointer; float:left;}
ul.main-button2 li {height:37px; width:131px; background-image: url("../images/main-nav.jpg");background-repeat:repeat-x; margin: 0px 0px 0px 0px;padding: 0px 0px 0px 0px;text-align: right;cursor: pointer; float:left;}

.main-button  a{display:block;}
.main-button2  a{display:block;}

ul.main-button li:hover{background-image: url("../images/main-nav.jpg"); background-repeat:repeat-x; background-position: 0px -37px;}
ul.main-button2 li:hover{background: url("../images/main-nav.jpg") repeat-x; background-position: 0px -37px;}
/*main nav end*/

	 <div id="main-nav">
		  <ul class="main-button">
			<li><a  href="index.php" title="it support">IT support</a></li>
			<li><a  href="it services.php" title="it services">IT services</a></li>
			<li><a  href="clients.php" title="clients">clients</a> </li>
			<li><a  href="company.php" title="company">company</a></li>
			<li><a  href="store.php" title="store">store</a></li>
			<li><a  href="news.php" title="news">news</a> </li>
			<li><a class="main-button2" href="locations.php" title="locations">locations</a> </li>

<div id="main-nav">
<ul class="main-button">
<li><a href="index.php" title="it support">IT support</a>
<li><a href="#" title="proactive IT Support">Proactive IT Support (LS+)</a></li>
<li><a href="#" title="proactive IT Support">Proactive IT Support (LS)</a></li>
<li><a href="#" title="Block Hours IT Support">Block Hours IT Support</a></li>
<li><a href="#" title="Pay as you go IT Support">Pay as you go IT Support</a></li>
<li><a class="main-button" href="it services.php" title="it services">IT services</a>
<li><a href="#" title="Installations and Upgrades">Installations and Upgrades"</a></li>
<li><a href="#" title="IT Security">IT Security</a></li>
<li><a href="#" title="Hosted Sevices">Hosted Sevices</a></li>
<li><a href="#" title="Planning and Consultancy">Planning and Consultancy</a></li>
<li><a href="#" title="Application Development">Application Development</a></li>
<li><a class="main-button" href="clients.php" title="clients">clients</a>

<li><a class="main-button" href="company.php" title="company">company</a>
<li><a href="#" title="Jobs">Jobs</a></li>
<li><a href="#" title="Green Fish">Green Fish</a></li>
<li><a href="#" title="Calculator">Calculator</a></li>
<li><a href="#" title="Super Support">Super Support</a></li>
<li><a href="#" title="Thinking of Selling">Thinking of Selling</a></li>
<li><a class="main-button" href="store.php" title="store">store</a></li>

<li><a class="main-button" href="news.php" title="news">news</a>
<li><a href="#" title="news catergories">Catergories</a></li>
<li><a href="#" title="Green Fish">White papers</a></li>
<li><a class="main-button2" href="locations.php" title="locations">locations</a>
<li><a href="#" title="Basingstoke IT Support">Basingstoke IT Support</a></li>
<li><a href="#" title="Birmingham IT Support">Birmingham IT Support</a></li>
<li><a href="#" title="Britol IT Support">Britol IT Support</a></li>
<li><a href="#" title="Cambridge IT Support">Cambridge IT Support</a></li>
<li><a href="#" title="Dartford IT Support">Dartford IT Support</a></li>
<li><a href="#" title="Edinburgh IT Support">Edinburgh IT Support</a></li>
<li><a href="#" title="Guildford IT Support">Guildford IT Support</a></li>
<li><a href="#" title="leeds IT Support">leeds IT Support</a></li>
<li><a href="#" title="leicester IT Support">leicester IT Support</a></li>
<li><a href="#" title="London Central IT Support">London Central IT Support</a></li>
<li><a href="#" title="London City IT Support">London City IT Support</a></li>
<li><a href="#" title="London West IT Support">London West IT Support</a></li>
<li><a href="#" title="Luton IT Support">Luton IT Support</a></li>
<li><a href="#" title="Manchester IT Support">Manchester IT Support</a></li>
<li><a href="#" title="Newcastle IT Support">Newcastle IT Support</a></li>
<li><a href="#" title="Northampton IT Support">Northampton IT Support</a></li>
<li><a href="#" title="Nottingham IT Support">Nottingham IT Support</a></li>
<li><a href="#" title="Oxford IT Support">Oxford IT Support</a></li>
<li><a href="#" title="Slough IT Support">Slough IT Support</a></li>
<li><a href="#" title="Swansea IT Support">Swansea IT Support</a></li>

Attached image(s)

  • Attached Image

Is This A Good Question/Topic? 0
  • +

Replies To: a tags and widths of divs

#2 chefjimmy   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 20-March 09

Re: a tags and widths of divs

Posted 20 March 2009 - 12:24 PM

Im having trouble understanding some of your questions,so i,ll try to help with question #2.This is a button,is it an image?Is it in an images folder?If so open the button you want to edit,i use gimp2 for this.Once you,ve opened the button use the text edit to edit the size,or you can test the button color via the eyedropper tool and fill in the the button by painting it,then choose font and color and size desired and edit away..good luck.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1