Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > vetical aignment of the text.

Reply
Thread Tools

vetical aignment of the text.

 
 
Mr. X.
Guest
Posts: n/a
 
      09-22-2008
Hello.
In CSS, while using the property line-height:46px;
the related line is vertical-aliged differently on some browser by default
(Opera has center vertical alignment, and IE 5 and more has the default of
top-vertical-alignment).

What is the property that may change the above vertical alignment ?

Thanks


 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      09-22-2008
Mr. X. wrote:

> In CSS, while using the property line-height:46px;


You shouldn't use the px unit for anything related to font size, except
possibly in a user style sheet.

> the related line is vertical-aliged differently on some browser by
> default (Opera has center vertical alignment, and IE 5 and more has
> the default of top-vertical-alignment).


What do you mean by that? Have you got a demo URL, and what makes you think
the alignments are as you described?

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
 
 
 
Mr. X.
Guest
Posts: n/a
 
      09-22-2008
Sorry ...

Yes.
Here is the demo :

test_nav.css :
=========
a {
text-decoration: none;
color: #0171AF;
}

a:hover {
text-decoration: none;
color: #111;
}

#nav {
position:absolute;
top:120px;
left:80px;
width:600px;
height:60px;
line-height:46px;
padding: 5px 0 0 0px;
}

#nav ul {
position:absolute;
top:0px;
left:0px;
}

#nav li {
float:left;
font-weight:700;
width:100px;
list-style-type:none;
}
#nav a {
text-decoration:none;
display:block;
text-align:center;
}

test_nav.html
=========

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="test_nav.css" />
</head>
<body>
<div id = "nav">
<ul>
<li"><a href="#">link A</a></li>
<li"><a href="#">link B</a></li>
<li"><a href="#">link C</a></li>
<li"><a href="#">link D</a></li>
<li"><a href="#">link E</a></li>
</ul>
</div>
</body>
</html>

copy the above, and see that links are not at the same positions, at some
navigators.
(for 1024x768 resolution. IE 7.0, and Safari 3.1 - it may be relevant to
some other navigator, such as the google's new navigator etc ...).

If there any way to control the <li> position ?

Thanks


 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      09-22-2008
Mr. X. wrote:

> Sorry ...


For what? Please learn how to post to Usenet. If you don't intend to, please
keep using the same forged From field; thank you in advance.

> Here is the demo :


Please learn what "URL" means.

> test_nav.css :


And get the clue that on Usenet, we need absolute URLs.

> copy the above,


Why would I do that for you, when you did not bother setting up a demo page
and posting its URL, even after being asked to.

Again, please keep using the same forged From field as long as you remain
clueless. Again, thanks in advance.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
Mr. X.
Guest
Posts: n/a
 
      09-22-2008
Why URL link ? It is not an advertising site ... and not a spammer's
searcher engine !
The code I gave is just fine and enough, to understand what's wrong !

Please, if you know how can I run the code on different browser, so it will
look the same.

Thanks


 
Reply With Quote
 
Mr. X.
Guest
Posts: n/a
 
      09-22-2008
Let it be simple :
delete the "block" property (it occures only once on the *.css file I have
givven).

All are at the same line - but if you run them on IE7, and Safari 3.1, their
top positions are not the same on that different browser.

If I could control the <li>'s top positions, it would be enough.

Thanks


 
Reply With Quote
 
Ari Heino
Guest
Posts: n/a
 
      09-22-2008
Yucca's point was clear and fair: put your code online, don't expect
anyone to make your job for you. That's the least you can do to get help.

--
Ari
http://users.utu.fi/athein/
 
Reply With Quote
 
Sherm Pendley
Guest
Posts: n/a
 
      09-22-2008
"Mr. X." <no_spam_please@nospam_please.com> writes:

> Why URL link?


Because that's the convention here.

> The code I gave is just fine and enough, to understand what's wrong!


If you knew what was "fine and enough" to understand the problem, you
wouldn't need to ask for help with it.

That's why the convention of posting a URL came about; far too often,
the posted code *isn't* enough.

> Please, if you know how can I run the code on different browser, so
> it will look the same.


What code? The message to which I'm replying has no code in it, and no
URL pointing to code.

sherm--

--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
 
Reply With Quote
 
Sherm Pendley
Guest
Posts: n/a
 
      09-22-2008
"Mr. X." <no_spam_please@nospam_please.com> writes:

> Let it be simple :


Let *what* be simple?

Please quote the relevant parts of the message you're replying to. If
you don't, and that message hasn't yet arrived at my local usenet
server, then your reply won't make any sense.

> delete the "block" property (it occures only once on the *.css file I have
> givven).


You can't "give" files here, it's not a group that allows attachments.

sherm--

--
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net
 
Reply With Quote
 
Mr. X.
Guest
Posts: n/a
 
      09-22-2008
Who said the convention here are that ???

It's a public newsgroup, from 50,000 and more newsgroups arround, you can
see on
"outlook express", google, and some other sites, and due that, it has no
such rules, unless the whole 50,000 newsgroups has the same rules,
and their are not.
You can look it as an helpdesk, or what ever.
That's the way internet does it's way, if you like it or not.

I don't have a link, because the site is not intented to be that one.
It may be under construction, or top secret.
I gave enough details.

And I give some more
(delete single "block" property on css file).

The following lines, makes the whole different, and solve the problem
(Why ? Cann't someone ever answer, because it's very difficult to pick up
the solution, even googling for days ...)

/* CSS RESET */
html{color:#000;background:#FFF;}body,div,dl,dt,dd ,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset ,legend,input,textarea,p,blockquote,th,td{margin:0 ;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption, cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,a cronym
{border:0;font-variant:normal;}sup {vertical-align:text-top;}sub
{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}legend{color:#000;}

body {font:13px/1.231
arial,helvetica,clean,sans-serif;}table{font-size:inherit;font-size:100%;}pre,code,kbd,samp,tt{font-family:monospace;line-height:100%;}
/* CSS RESET */

Thanks


 
Reply With Quote
 
 
 
Reply

Thread Tools

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 Off




Advertisments