473,800 Members | 2,648 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Text Different in <li> and <p>

18 New Member
Problem: font-size seems to be rendered differently for <li class="issue"> and for <p class="issue">. (Example is in: www.dvmvac.com/snippet/ ... ignore background - I just did a quick file copy and didn't get bkgnd file resolved.)

In external CSS, I define 'body' to have a font-size of 10px .... and 'h2' to be 300%(which works - see header) .... then I define (or redefine) 'p' to be 120%.

Inline (testing there before exporting to css file) I define 'issue' to have a font-size of 160% .... the <li> text is 16px but the <p> lines are much smaller even though they both have class="issue".

Trying to redesign a website and am using CSS for the first time ... so I suspect my path - inhreitance - is wrong.

Can someone point out my problem?
Aug 12 '06 #1
7 1872
gener672
18 New Member
ops - my bad .... tried in Firefox and IE6 ... same result in each
(Also mispelled inheritance - srya)
Aug 12 '06 #2
kestrel
1,071 Recognized Expert Top Contributor
is your css
[HTML]
.issue {your style}
[/HTML]
?
put just the period in the front.

let me see your entire css page, email it to me or just post it
Aug 12 '06 #3
gener672
18 New Member
Have sent a PM with xternal css code and yes, my html (inline style) is:
.issue {....}

Thanks for the time.
Aug 12 '06 #4
kestrel
1,071 Recognized Expert Top Contributor
you know,
browsers will interpret classes different, depending on which tag its under.
so a browser will determine your 'issue' class, differently
under
<li> and <p>

so you're best bet is to make separate css styles for each HTML tag
Expand|Select|Wrap|Line Numbers
  1. /* Tag,Class */
  2. li.issue {...}
  3. p.issue {...}
  4.  
then this will be your html
[HTML]
<li class="issue">T EXT</li>
<br />
<p class="issue">T EXT</p>
[/HTML]

it might work, or it might not.

let me know, mean while, ill be think of other ways
Aug 13 '06 #5
gener672
18 New Member
Sorry to not get back ... have been trying many things - nothing works

defining same class for li and p didnt work
Aug 21 '06 #6
ronverdonk
4,258 Recognized Expert Specialist
Did you take the <p> (re) definition of 120% out?

Ronald :cool:
Aug 22 '06 #7
gener672
18 New Member
Thank you for the suggestion - but it didn't work (tried moving link for css file to be before the inline styles-no joy, next tried redefining 'p' inline - no joy, then tried deleting 'p' from css file - again no joy)

Somewhat new to CSS and thought an inline rule would trump the external - am I wrong?
Aug 22 '06 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

3
4178
by: Kelvin | last post by:
Basically, my texts consists of normal text stream and some quotations. This is my text stream, and inside "this streams" there are some "quotation pairs" which are to be replaced like this: <LI>this streams</LI> for formatting in HTML. Tried ___s/\".*?\"/<li>.*?<\/li>/g;___ but not working. Thanks.
3
10776
by: abro | last post by:
Problem: A list contained in a div contains several items that are made of two parts: itemName and itemValue. ie: <div id="data"> <li>longtime1 <span> 1326 mins></span></li> <li>longtime2 <span> 1692 mins</span></li> <li> time1 <span> 24 mins </span></li>
4
9538
by: Matt | last post by:
Hi, Got an unordered list with 100% width, with 5 list items of 20% width styled to fill the width of the container element. Renders fine in Mozilla, but when you change the size of the window in IE, the last item in the list has a nasty tendency to wrap down to the next line (and stay there). I can hack it (imperfectly) by setting the width of the list items to
5
1842
by: Steel | last post by:
Hi at all, please consider this : <ul> <li><a>No link</a></li> <li><a href="#">This is a link</a></li> <li><a>No link</a></li> <li><a href="#">This is a link</a></li> .................... </ul> How can I do to match the <li> element that have as son the <a
4
5160
by: Bernd Schlingenkamp | last post by:
Hi! A stupid question (I think I have to read the spec more detailed): what kind of content is allowed for <li>-Elements? Is this valid html: <ul> <li><div>somecontent</div></li> <li><div>somecontent</div></li> <li><div>somecontent</div></li> </ul>
6
2281
by: cbartlett | last post by:
If I have: <ul id="theUL"> <li id="anLi1">some text</li> <li id="anLi2">some other text</li> <ul> How can I get the value of the text within the the li's? Any help much appreciated. thanks Charlie.
7
3649
by: patrick j | last post by:
Hi I'm wondering about lists with nested lists as one does on a Saturday afternoon. Anyway below is an example of a list with a nested list which the iCab browser's very useful HTML verification ability will not like: <ul> <li><a href="#">link</a></li>
9
3482
by: eros | last post by:
<li>List <ul> <li>List1</li> <li>List2</li> <li>List3</li> </ul> </li> How to call the php code from that html tags... when I click List1?
2
7069
by: GloStix | last post by:
For some reason, FF likes to put a black underline on all my buttons. No matter what I do, it has the line I've tried displaying as block and cursor, anything.. Also I've been trying to get it so the entire block is clickable, not just the text. I've sorta got it so it's clickable, just some parts of the button I still can't click on. The website is http://pdhtdev.johnabbott.qc.ca/students/2010/james_mann/portfolio/index.htm The css...
0
9550
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10501
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10273
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10032
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7574
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.