7 replies [Last post]
homchz
Offline
Enthusiast
Last seen: 13 years 37 weeks ago
Joined: 2004-07-23
Posts: 77
Points: 0

When trying to define UL I am having and issue when implementing it.

Everything indents.

I am looking for a list that is slightly indented but not to the extreme that is it now.

Is there away to define UL so it does not do this?

Stu
Stu's picture
Offline
Enthusiast
Bristol uk
Last seen: 16 years 35 weeks ago
Bristol uk
Joined: 2004-01-20
Posts: 282
Points: 0

Defining UL

Try setting ul {margin-left: xx; padding-left:xx;}
where xx is the required indent.

It's not what you do it's the way that you do it.
So do it with STYLE
http://www.s7u.co.uk

homchz
Offline
Enthusiast
Last seen: 13 years 37 weeks ago
Joined: 2004-07-23
Posts: 77
Points: 0

Defining UL

It works but I have to set

margin-left: -XX and the XX is like 30px

plus I would have figured UL woudl have listed the text but it is not I still have to <br> in oder for them to list correctly

<div class="navbox">
	     <ul>
		<a href="YankeeInfo.php">Company Information</a>
	        <a href="Invest.php">Investment Seminars</a>
	        <a href="STPD.php">St. Patrick's Day Trade Show</a>
	      </ul>
	   </div>

Displays as if is was straight text and

<div class="navbox">
              <ul>
		<a href="YankeeInfo.php">Company Information</a><br>
	        <a href="Invest.php">Investment Seminars</a><br>
	        <a href="STPD.php">St. Patrick's Day Trade Show</a><br>
	      </ul>
	   </div>

Displays as desired effect, so why bother with ul or am I not doifn this correctly?

homchz
Offline
Enthusiast
Last seen: 13 years 37 weeks ago
Joined: 2004-07-23
Posts: 77
Points: 0

Defining UL

The lower above is how I have to set it for it to look right in design and most broswers

IE6 sees it as correct in the very top example.

Is this case for another hack?

rtm223
rtm223's picture
Offline
Enthusiast
Last seen: 16 years 18 weeks ago
Joined: 2004-05-18
Posts: 58
Points: 0

Defining UL

<ul> defines a list block

Inside that you need to have list items, <li>'s, and it is these elements that create the line breaks.

<div class="navbox">
    <ul>
        <li><a href="YankeeInfo.php">Company Information</a></li>
        <li><a href="Invest.php">Investment Seminars</a>
        <li><a href="STPD.php">St. Patrick's Day Trade Show</a></li>
    </ul>
</div> 

Would be the correct way of creating a list. It is very much the same as a table, with the <tr>'s and <td>'s

css layout tutorials - in depth layout tutorials for all you newbies D maybe even some stuff for you not-so-new-bies out there P

homchz
Offline
Enthusiast
Last seen: 13 years 37 weeks ago
Joined: 2004-07-23
Posts: 77
Points: 0

Defining UL

Thanks I just got that, now how about a trick for getting them to llok the dame in FF and IE.

Everything looks fine as in IE 6 but FF throws the bullets off the page.

rtm223
rtm223's picture
Offline
Enthusiast
Last seen: 16 years 18 weeks ago
Joined: 2004-05-18
Posts: 58
Points: 0

Defining UL

best bet is to fiddle with th padding and margins, as one browser uses margins for the indent, and one uses padding. If you set BOTH padding and margin explicitly, you can override the browser default behaviour, and then you will obtain cross browser conformance. Smile

It's all good fun this web design stuff, isn't it? Wink

css layout tutorials - in depth layout tutorials for all you newbies D maybe even some stuff for you not-so-new-bies out there P

homchz
Offline
Enthusiast
Last seen: 13 years 37 weeks ago
Joined: 2004-07-23
Posts: 77
Points: 0

Defining UL

Thanks for the tip.

I use DMX2004 for design and things tend to get muddled in layout view but work in the browsers. That is more bother some than the actual work. :roll: My own issue I know.