Text Placement in html / php

beastmodeenabled86

New Member
Messages
9
Reaction score
0
Points
0
Hello Community,

I am needing your help again this time with moving my text. if you can see on my site (www.techerzfm.co.cc) where "Server is offline" is i would like it directly below "Current song". Below i will feature some snippets of the php code, and the css.

.track_name{
width:295px;
height:104px;
background:url(images/track_playing.gif) no-repeat center;
margin:10px 0 0 0px;
font-size:7px;
text-align:center;

<p><b>Current Song:</b> <p>
<?php include("test.php");?> </p> </div>

Thanks,
Mike.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
The problem isn't within the CSS you've posted, it's the padding you've assigned for .track_name p, which pushes the second paragraph element out of the .track_name element. For situations like this, you should be using absolute positioning

Code:
.track_name {
    position: relative;
    font-size: small;
    ...
}

.track_name p {
    position: absolute;
    top: 35px;
    left: 20px;
    width: 100%;
}

.track_name p:last-child {
    top: 52px;
}

The current text size is far too small to read. Even someone with good eyesight will find it hard to read anything under 10pt.

px isn't a suitable unit for font size in web design.

<b> is non-semantic; don't use it. Use CSS for bold text.

@h4xxed55: that thread is for a different issue. New issue, new thread.
 
Last edited:

Darkmere

New Member
Messages
358
Reaction score
2
Points
0
I have to agree with the Font size ... you know how small 7pt is on say a Tablet PC or even worse on a mobile phone. You want the browser to chose the font size for you so you get your small font but it wont be un-readable on smaller screens.
 
Top