Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Reply
 
LinkBack Thread Tools Display Modes
Old 10-12-2011, 03:10 PM   #1 (permalink)
Broken In
 
dharmil007's Avatar
 
Join Date: May 2010
Posts: 133
Default <li> tag problem in CSS


Hello,
i have written a small HTML file for college purpose.
i m just learning HTML in college.
But its not displaying as it should be.

There is a lot of space before & after the li {audi, bmw, etc} TAGs.i want to remove it but its not getting removed. & the image in the 2nd li tag which is used as bullet has gone out of the screen.

So pls. can anybody help me fix this 2 problems

IMAGE :-




CSS CODE :-

PHP Code:
@font-face
{
font-familynsecthin;
src url('nsecthin.ttf')
}
body
{
margin:10px;
background-color:green;
}
.
header
{
text-align:center;
text-transform:uppercase;
color:black;
text-decoration:underline;
font-family:nsecthin,Constantia;
font-size:2.0em;
letter-spacing:3px;
font-weight:bold;
text-indent0;
line-height:50px;
background-color:yellow;
border:2px solid white;
}
.list
{

font-family:constantia;
font-size:2em;
padding:0;
margin:0;
border:2px solid white;
list-
style-position:inside;
}

.
ul2 li
{
height:2px;
list-
style-type:none;
float:none;

display:inline;
border:2px solid white;
list-
style-position:inside;
}

.
ul2 a
{
float:none;
width:1em;
text-decoration:none;
color:white;
display:inline;
background-color:blue;
padding-left:0;
border:2px solid white;


HTML CODE :-
PHP Code:
<html>
<
head>
<
link rel "stylesheet" type "text/css" href "myStyle2.css" />
<
style type="text/css">
#ul1
{
list-
style-image:url('1.bmp');
padding:0px;
float:left;
}
</
style>

<
title>CARS</title>
</
head>
<
body>

<
div class = "container" style=width="100%">

<
div class = "header" height "20%" width "100%">
CARS
</div>

<
div class = "list" height "10%" width "100%">
    <
ul class ="ul2">
<
li><a href "#">HOME</a></li>
<
li><a href "bmw.htm">BMW</a></li>
<
li><a href "audi.htm">AUDI</a></li>
<
li><a href "pors.htm">PORSCHE</a></li>
<
li><a href "lamb.htm">LAMBORGHINI</a></li>
    </
ul>
</
div>


<
ul id "ul1">
<
li>AUDI</li>
<
li>PORSCHE</li>
<
li>BMW</li>
<
li>LAMBORGHI   NI</li>
</
ul>
</
div>
</
body>

</
html
__________________
PHENOM II X6 @ 2.8GHz || GA-880GM-UD2H || Kingston 2x2GB Dual-Channel DDR3 || 500GB WDC || Logitech MX518 || Samsung 20" LED SA20A300N
dharmil007 is offline   Reply With Quote
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 10-12-2011, 04:23 PM   #2 (permalink)
Wise Old Owl
 
clmlbx's Avatar
 
Join Date: Aug 2006
Location: Indore
Posts: 1,687
Default Re: <li> tag problem in CSS

Well I have not used this for while but this looks like a fault of Padding and margin.

1. Space problem.. try changing Padding values(increase it) see it is working or not. Edit :- tried myself not working

2. image not shown problem , try giving margin over there

checked image problem is because of margin.. just add it and it will be done.
__________________
Athlon II X4 635 @ 2.9Ghz   Gigabyte GA-MA785GMT-US2H   Kingston 2x2 Gb 1333Mhz DDR3   WDC 500Gb Green   Palit GTS 250 512mb   Tagan 500W   Samsung B2030   Lg DVD Writer

Last edited by clmlbx; 10-12-2011 at 04:35 PM.
clmlbx is online now   Reply With Quote
Old 10-12-2011, 04:53 PM   #3 (permalink)
Broken In
 
dharmil007's Avatar
 
Join Date: May 2010
Posts: 133
Default Re: <li> tag problem in CSS

Quote:
Originally Posted by clmlbx View Post
Well I have not used this for while but this looks like a fault of Padding and margin.

1. Space problem.. try changing Padding values(increase it) see it is working or not. Edit :- tried myself not working

2. image not shown problem , try giving margin over there

checked image problem is because of margin.. just add it and it will be done.


1. Then whats the solution of the 1st issue ??
2. by giving margin or padding, it solves the issue but i just want to ask, why is it like that by default ???
__________________
PHENOM II X6 @ 2.8GHz || GA-880GM-UD2H || Kingston 2x2GB Dual-Channel DDR3 || 500GB WDC || Logitech MX518 || Samsung 20" LED SA20A300N
dharmil007 is offline   Reply With Quote
Old 10-12-2011, 04:57 PM   #4 (permalink)
Wise Old Owl
 
clmlbx's Avatar
 
Join Date: Aug 2006
Location: Indore
Posts: 1,687
Default Re: <li> tag problem in CSS

For second Problem take that as, on default it is page with no margin(margin=0).. hence no margin then it starts from edge..
__________________
Athlon II X4 635 @ 2.9Ghz   Gigabyte GA-MA785GMT-US2H   Kingston 2x2 Gb 1333Mhz DDR3   WDC 500Gb Green   Palit GTS 250 512mb   Tagan 500W   Samsung B2030   Lg DVD Writer
clmlbx is online now   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Charan
- by Sarath
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 12:37 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2