![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Im making my first foray into table-less web site design and have run into a brick wall. This is the URLs: http://www.ainewmedia.co.uk/css_page.htm http://www.ainewmedia.co.uk/css_test.css Im using an inline list for my horizontal navbar items with the right hand border of each <LI> item set to white 1px to create the illusion of a divider between each item. The trouble is, no matter what I try it only fills about 3/4 of the 23px block. I want the divider lines to fill the block from top to bottom. Ive tried loads of things but am stuck. Can anyone please help? |
#3
| |||
| |||
|
|
On 2006-09-25, john_aspinall (AT) yahoo (DOT) co.uk <john_aspinall (AT) yahoo (DOT) co.uk> wrote: Im making my first foray into table-less web site design and have run into a brick wall. This is the URLs: http://www.ainewmedia.co.uk/css_page.htm http://www.ainewmedia.co.uk/css_test.css Im using an inline list for my horizontal navbar items with the right hand border of each <LI> item set to white 1px to create the illusion of a divider between each item. The trouble is, no matter what I try it only fills about 3/4 of the 23px block. I want the divider lines to fill the block from top to bottom. Ive tried loads of things but am stuck. Can anyone please help? This is pretty difficult. You could get it to work by changing the line-height property of the <ul>, but it's not advisable, as the height of the <li> inline-boxes and therefore of their borders is not precisely defined. See CSS 2.1 10.6.1: "The height [...] should be based on the font, but this specification does not specify how". The best thing to use here would arguably be inline-block, although Firefox doesn't support those. So I suggest make the <ul> and <li> both float: left, and then you can set the height on the <li> to 23px. |
#4
| |||
| |||
|
|
Sweet, your last suggested worked perfectly, thanks. I dont understand why it works and would like to! What was going on with the floats and why did it make it work? I thought float was used to make content flow around a block? Cheers....John Ben C wrote: On 2006-09-25, john_aspinall (AT) yahoo (DOT) co.uk <john_aspinall (AT) yahoo (DOT) co.uk> wrote: Im making my first foray into table-less web site design and have run into a brick wall. This is the URLs: http://www.ainewmedia.co.uk/css_page.htm http://www.ainewmedia.co.uk/css_test.css Im using an inline list for my horizontal navbar items with the right hand border of each <LI> item set to white 1px to create the illusion of a divider between each item. The trouble is, no matter what I try it only fills about 3/4 of the 23px block. I want the divider lines to fill the block from top to bottom. Ive tried loads of things but am stuck. Can anyone please help? This is pretty difficult. You could get it to work by changing the line-height property of the <ul>, but it's not advisable, as the height of the <li> inline-boxes and therefore of their borders is not precisely defined. See CSS 2.1 10.6.1: "The height [...] should be based on the font, but this specification does not specify how". The best thing to use here would arguably be inline-block, although Firefox doesn't support those. So I suggest make the <ul> and <li> both float: left, and then you can set the height on the <li> to 23px. |
#5
| |||
| |||
|
|
Sweet, your last suggested worked perfectly, thanks. I dont understand why it works and would like to! What was going on with the floats and why did it make it work? I thought float was used to make content flow around a block? |
|
Ben C wrote: On 2006-09-25, john_aspinall (AT) yahoo (DOT) co.uk <john_aspinall (AT) yahoo (DOT) co.uk> wrote: Im making my first foray into table-less web site design and have run into a brick wall. This is the URLs: http://www.ainewmedia.co.uk/css_page.htm http://www.ainewmedia.co.uk/css_test.css Im using an inline list for my horizontal navbar items with the right hand border of each <LI> item set to white 1px to create the illusion of a divider between each item. The trouble is, no matter what I try it only fills about 3/4 of the 23px block. I want the divider lines to fill the block from top to bottom. Ive tried loads of things but am stuck. Can anyone please help? This is pretty difficult. You could get it to work by changing the line-height property of the <ul>, but it's not advisable, as the height of the <li> inline-boxes and therefore of their borders is not precisely defined. See CSS 2.1 10.6.1: "The height [...] should be based on the font, but this specification does not specify how". The best thing to use here would arguably be inline-block, although Firefox doesn't support those. So I suggest make the <ul> and <li> both float: left, and then you can set the height on the <li> to 23px. |
#6
| |||
| |||
|
|
Im making my first foray into table-less web site design and have run into a brick wall. This is the URLs: http://www.ainewmedia.co.uk/css_page.htm http://www.ainewmedia.co.uk/css_test.css Im using an inline list for my horizontal navbar items with the right hand border of each <LI> item set to white 1px to create the illusion of a divider between each item. The trouble is, no matter what I try it only fills about 3/4 of the 23px block. I want the divider lines to fill the block from top to bottom. |
#7
| |||
| |||
|
|
On 2006-09-25, john_aspinall (AT) yahoo (DOT) co.uk wrote: http://www.ainewmedia.co.uk/css_page.htm no matter what I try it only fills about 3/4 of the 23px block. in my browser window they overflow the block: http://cfaj.freeshell.org/testing/ainewmedia.jpg |
#8
| |||
| |||
|
|
Also, Ive just noticed I am getting the dreaded horizontal scroll bar appearing! I dont have anything set to over 100% in width - what goings on? |
![]() |
| Thread Tools | |
| Display Modes | |
| |