This is a discussion on "Help withs <ul>'s" within the Web Page Design section. This forum, and the thread "Help withs <ul>'s are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Help withs <ul>'s
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Help withs <ul>'s
This is kind of a stupid question, but could someone tell me how I can get a <ul> to sperate on to two different lines like in the image attached.
Thanks, Pádraig. |
|
|
|
#2
|
|||
|
|||
|
Re: Help withs <ul>'s
You could give it a class or id and then apply clear:both; in the css should work as long as nothing is conflicting with it. There may be another way though I can't think of it at the minute. You would give the 'Contact me' li the class. I forgot to mention.
Pete. Last edited by pa007; Jun 30th, 2007 at 22:16. Reason: i forgot something |
|
#3
|
|||
|
|||
|
Re: Help withs <ul>'s
I just thought, you would be best giving it a class of "clear" or something similiar. That way if anything else on the site needed clearing you could just use that class again.
Pete. |
|
#4
|
|||
|
|||
|
Re: Help withs <ul>'s
So some thing like...
HTML
|
|
#5
|
|||
|
|||
|
Re: Help withs <ul>'s
Give me a minute, this should be easy but it's not.
Pete. Last edited by pa007; Jun 30th, 2007 at 23:02. |
|
#6
|
|||
|
|||
|
Re: Help withs <ul>'s
Thanks alot!
Last edited by Pádraig; Jun 30th, 2007 at 23:15. |
|
#7
|
|||
|
|||
|
Re: Help withs <ul>'s
I think I've got it now.
Use the following code and it will give you the required effect. there may be a better way, I've never done this before so I'm not sure, but this works. HTML:
Pete. |
|
#8
|
|||
|
|||
|
Re: Help withs <ul>'s
Thanks alot, Pete!
|
|
#9
|
|||
|
|||
|
Re: Help withs <ul>'s
It had me stumped for a minute but it should be ok now. Just make sure you use display: inline; rather than float: left; to give the horizontal nav.
Let me know if it works or not. Pete. |
|
#10
|
|||
|
|||
|
Re: Help withs <ul>'s
Yep, its working!
|
|
#11
|
|||
|
|||
|
Re: Help withs <ul>'s
Excellent. If that hadn't have worked I would never have coded another site. I would have closed BBedit for the last time. The pressure was unbearable. Luckily it's all ok. Phew!
Pete. |
|
#12
|
|||
|
|||
|
Re: Help withs <ul>'s
Hahahahaha...lol. The alternative was to use two <ul>'s, but I prefer your way!
|
|
#13
|
|||
|
|||
|
Re: Help withs <ul>'s
I was thinking that but it just wasn't right. It's one list so to put in two ul's is like saying it's 2 lists. Me being a stickler for semantics and all I just couldn't bring myself to say that was the best way. It was a lucky escape, for both of us. Who'd have thought a bit of innocent html and css could push us so close to the edge?
I think I need a lie down. Pete. |
|
#14
|
|||
|
|||
|
Re: Help withs <ul>'s
I think now would be a bad time to say that I have another 50 questions I would like answered.
|
|
#15
|
|||
|
|||
|
Re: Help withs <ul>'s
Fire away, I like life on the edge.
Pete. |
|
#16
|
|||
|
|||
|
Re: Help withs <ul>'s
I would have taken the easy route and put in a <br/>
* hahahahahaha *hands Pete an ice pack for head! |
|
#17
|
|||
|
|||
|
Re: Help withs <ul>'s
It wasn't really too difficult to be honest but I couldn't for the life of me figure out how to do it. Then it clicked. It's like when you can't remember a word and it really gets on your nerves. Kind of.
Pete. |
|
#18
|
|||
|
|||
|
Re: Help withs <ul>'s
Would a much simpler method not have been to just give the ul a suitable width? Anything going over that width would span onto a new line by itself.
|
|
#19
|
|||
|
|||
|
Re: Help withs <ul>'s
Yeah, I never thought of that. But if the text was resized it could mess that up. I tried for a bulletproof method though I don't know how bulletproof it is.
Pete. |
![]() |
| Tags |
| lists, unordered |
| Thread Tools | |
|