473,395 Members | 1,623 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Text Different in <li> and <p>

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 1843
ops - my bad .... tried in Firefox and IE6 ... same result in each
(Also mispelled inheritance - srya)
Aug 12 '06 #2
kestrel
1,071 Expert 1GB
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
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 Expert 1GB
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">TEXT</li>
<br />
<p class="issue">TEXT</p>
[/HTML]

it might work, or it might not.

let me know, mean while, ill be think of other ways
Aug 13 '06 #5
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 Expert 4TB
Did you take the <p> (re) definition of 120% out?

Ronald :cool:
Aug 22 '06 #7
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
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:...
3
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...
4
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...
5
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> .......................
4
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>...
6
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...
7
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...
9
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
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...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
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...

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.