I change the td font size to 18px , but it looks like bold? How can I fix this?
<table border="0" cellpadding="0" cellspacing="0" width="600" bgcolor="#ffffff">
<tr>
<td align="center" style="color: #000000;font-family: Arial, sans-serif;font-weight: normal;font-size: 18px;line-height: 27px;text-decoration:none;padding: 33px 91px 10px 91px;letter-spacing: 1px;border-left:1px solid #d2d2d2;border-right:1px solid #d2d2d2;">
Oops, This Page Could Not Be Found!
</td>
</tr>
<tr>
<td align="center" style="color: #000000; font-family: Arial, sans-serif; font-weight: normal; font-size: 18px; line-height: 18px; text-decoration:none; padding: 28px 0 41px 0; letter-spacing: 1px;border-left:1px solid #d2d2d2;border-right:1px solid #d2d2d2;">
Oops, This Page Could Not Be Found!<a style="color:#7D7D7D;text-decoration:none;">Oops, This Page Could Not Be Found!</a>Oops, This Page Could Not Be Found!
<a style="color:#7D7D7D;text-decoration:none;">Oops, This Page Could Not Be Found!</a>
</td>
</tr>
</table>
Change the font weight of your TD's to a specific number of your choice (100, 200, 300 etc.) and see what is the best for your design like the following example:
td {font-weight: 200;}
There are many ways of solving it. Firstly, you could reduce the weight of the font in your css
td {
font-size: size px;
use font weight
}
or
you could change your font that does not look bold as sometimes it is because of the font being used it looks its bold but it is not bold.
or
you might have put the font in <strong></strong> tag that might have put a bold effect over it.
You have to change the font-weight property.
td{
font-size: 18px;
font-weight: normal;
}
More information about font-weight here https://www.w3schools.com/cssref/pr_font_weight.asp
Maybe a class override your td so you have to use.
td{
font-size: 18px;
font-weight: normal!important;
}
But please note that use !important is not a good practice but an hard fix. If you provide your .css code I can help you more further.
Related
I am trying to create an Email Signature Generator. I am trying to get the blue line (it can be seen in the program) to stretch all the way down. However, when I do it, it stretches the rest of the items. I believe this may be because it is all inside a table and when one element is sized differently than the others, it tries it equal it out but I am not sure how to change it. Here is my code:
table {
display: inline-block;
}
#image {
width: 200px;
height: 200px;
border-radius: 50%;
}
.spacer {
width: 30px;
}
hr {
height: 200px;
width: 7.5px;
border-radius: 20px;
border: none;
background-color: cornflowerBlue;
}
#fullName {
font-family: 'Source Sans Pro', sans-serif;
font-size: 24px;
color: orange;
}
#job {
font-family: 'Source Sans Pro', sans-serif;
font-size: 16px;
padding-top: 11px;
}
#jobLocationText {
font-family: 'Source Sans Pro', sans-serif;
font-size: 15px;
padding-top: 6px;
}
<table cellpadding="0" cellspacing="0" border="0" style="background: none; border-width: 0px; border: 0px; margin: 0; padding: 0;">
<tr>
<td>
<img src="https://vignette2.wikia.nocookie.net/mafiagame/images/2/23/Unknown_Person.png/revision/latest?cb=20151119092211" id="image">
</td>
<td class="spacer"></td>
<td>
<hr>
</td>
<td class="spacer"></td>
</tr>
<tr>
<td>
<center>
<div id="fullName">Billy Staples</div>
</center>
</td>
</tr>
<tr>
<td>
<center>
<div id="job"><i>Programmer</i></div>
</center>
</td>
</tr>
<tr>
<td>
<center>
<div id="jobLocationText">at the <b id="jobLocation">HTML hub</b></div>
</center>
</td>
</tr>
</table>
And a working version can be found here.
Again, I am trying to get it so the hr (in the CSS) when the height is changed (to say 300 or something) it doesn't stretch the rest of the table with it. If you have an idea as to how I might be able to do my table differently so that it might be easier or just so that I could fix this problem, suggestions are welcome!
Thanks in advance!
Use rowspan="" to strech <hr> to way down,
<td rowspan="4">
<hr>
</td>
Here's your updated code, https://jsfiddle.net/he84kv8n/10/
<hr> is a horizontal rule (divider), bending it to be a vertical rule (divider) is a use case that will likely be difficult for anyone looking at your code to decipher.
I would suggest using a CSS border attribute on the table cell, that will automatically be the correct size.
In gMail, the font-size that I set for <td>s work except for this one: (edit: I spotted the typo, changed it but still doesn't work on gmail :( )
<tr>
<td class="inner" style="font-family: 'Arial Black', 'Arial Bold', Gadget, sans-serif; font-weight:800; font-size: 80pt!important; text-align: center">
$33
</td>
</tr>
Any idea why this doesn't work? Strangely enough, it works for this:
<tr>
<td class="inner" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16pt; text-align: center; padding: 0; white-space:nowrap">
We never win because you only believe in science!
</td>
</tr>
On CSS,this rule was added:
div,p,a,li,td {
-webkit-text-size-adjust: none;
-moz-text-size-adjust: none;
-ms-text-size-adjust: none;
text-size-adjust: none;}
Any help will be appreciated!
It appears you have font-family: twice!
Hope that helps!
I'm trying to vertically align text in two table columns, one of which also has a text input control. Basic code such as:
<td>Caption</td><td>Enter here <input type="text"></td>
No matter how I apply vertical-align to one or both columns, 'Caption' is not on the same level as 'Enter here'. Most times 'Caption' is higher. What's the solution?
Try:
td, input {
vertical-align: middle;
}
If that doesn't work, you will need to post more code to get a good answer.
If you mean that Caption and Enter here are not vertically aligned, despite using the suggested 'vertical-align: middle;' you may have to look into giving the columns a specific or minimum width. I am suspecting that the elements may not be perfectly positioned visually next to each other on the 'reading' level, due to the columns adjusting with top/bottom padding in order to maintain vertical alignment. Therefore being strict about the width of your columns may help.
However I agree with #willoller, if this on top of what the rest of the community suggested isn't working for you, then you need to post relevant code that will help us pinpoint an answer for you.
It should vertical align to middle by default assuming there isn't some other CSS being applied. ... your issue might be related to line height where text and inputs aren't the same .. ..try:
td{
line-height:40px;
height:40px;
}
Thanks for everyone's help so far. The line-height and height additions correct the vertical alignment of the two texts, but also significantly increase the inter-row spacing. This doesn't improve if I set the margin, padding and border to 0. I can't reduce the heights to less than 40px or the alignment fails again.
The following code demonstrates the problems. There's a demo page at www.quinze.co.uk/test/test.html.
<!DOCTYPE HTML>
<html>
<head>
<meta charset=utf-8>
<title>Table test</title>
<style type="text/css">
.s0 {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
}
.s1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
vertical-align: middle;
line-height: 40px;
height: 40px;
}
.s2 {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
vertical-align: middle;
line-height: 40px;
height: 40px;
padding: 0;
margin: 0;
border-width: 0;
}
</style>
</head>
<body>
<pre> font-family: Arial, Helvetica, sans-serif;
font-size: 13px;</pre>
Col1 captions have different vertical alignment to Col2 but inter-row spacing is good.
<table>
<tr>
<td class="s0">Col1</td>
<td class="s0">Col2<input type="text"></td>
</tr>
<tr>
<td class="s0">Col1</td>
<td class="s0">Col2<input type="checkbox" checked><input type="text" value="ABC"></td>
</tr>
<tr>
<td class="s0">Col1</td>
<td class="s0">Col2<input type="text"></td>
</tr>
</table>
<pre> font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
vertical-align: middle;
line-height: 40px;
height: 40px;
</pre>
The two column captions are now at the same height but the inter-row spacing has increased
<table>
<tr>
<td class="s1">Col1</td>
<td class="s1">Col2<input type="text"></td>
</tr>
<tr>
<td class="s1">Col1</td>
<td class="s1">Col2<input type="checkbox" checked><input type="text" value="ABC"></td>
</tr>
<tr>
<td class="s1">Col1</td>
<td class="s1">Col2<input type="text"></td>
</tr>
</table>
<pre> font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
vertical-align: middle;
line-height: 40px;
height: 40px;
padding: 0;
margin: 0;
border-width: 0;
</pre>
Padding, margins and border reduced to 0 but still greater inter-row spacing
<table>
<tr>
<td class="s2">Col1</td>
<td class="s2">Col2<input type="text"></td>
</tr>
<tr>
<td class="s2">Col1</td>
<td class="s2">Col2<input type="checkbox" checked><input type="text" value="ABC"></td>
</tr>
<tr>
<td class="s2">Col1</td>
<td class="s2">Col2<input type="text"></td>
</tr>
</table>
</body>
</html>
I am trying to get the following HTML to fully render in Outlook 2010 fake a button (since outlook doesn't render many css selectors). :
<table style="border: solid; background-color: red;">
<tbody >
<tr>
<td><a style = "text-decoration:none"href="www.google.com" ><span style="color: black;">here</span></a></td>
</tr>
</tbody>
</table>
Everything seems to work except the border lining does not render at all. From what I understand, outlook should render this (http://www.campaignmonitor.com/css/), but does not. Any help anyone can provide would be appreciated.
I usually just use shorthand css properties for borders like so:
<table cellspacing="0" cellpadding="0"> <tr>
<td align="center" width="300" height="40" bgcolor="#fff" style="-webkit-border-radius: 5px; -moz-border-radius: 5px; border: solid 1px #e9e9e9; border-radius: 5px; color: #000; display: block;">
<a href="http://www.EXAMPLE.com/" style="color: #000; font-size:16px; font-weight: bold; font-family: Helvetica, Arial, sans-serif; text-decoration: none; line-height:40px; width:100%; display:inline-block">
Awesome Email Button
</a>
</td>
</tr>
</table>
(Weirdly) for some reason shorthand border css properties render correctly in Outlook 07 and 2010
See http://jsfiddle.net/E6ZYz/
Reference link: http://emailwizardry.nightjar.com.au/2012/08/30/outlook-200710-borders-pain/
I want to apply the following style on my specific td but I dont know why its unable to do so
/*Style*/
font: 100%/1.4 "Alvi Nastaleeq", Verdana, Arial, Helvetica, sans-serif; color: black;
<td colspan="2" class="centerAlign border">ABC</td>
kindly help to do so. Thanks in advance.
EDIT:
The class centerAlign border is class for all other td's but I want to apply special styling on this cell.
Here is a new style created for your td element
<style type="text/css">
.style1
{
font-size:100%;
font-family: "Alvi Nastaleeq", Verdana, Arial, Helvetica, sans-serif;
color: #00000;
}
</style>
To use it just modify your td as such
<td colspan="2" class="centerAlign border style1">ABC</td>
You cannot use 100%/1.4 for your font-size. Anyway, wrap your style in another class and apply it to your element:
.font-style {
font-family: "Alvi Nastaleeq", Verdana, Arial, Helvetica, sans-serif;
color: black;
font-size: 13px;
}
HTML:
<td colspan="2" class="centerAlign border font-style">ABC</td>
Css
.centerAlign.border{
font: 100%/1.4 "Alvi Nastaleeq", Verdana, Arial, Helvetica, sans-serif; color: black;
}
HTML
<table>
<tr>
<td colspan="2" class="centerAlign border">ABC</td>
</tr>
</table>
Live demo http://jsfiddle.net/mWRMS/1/
HTML
<table>
<tr>
<td colspan="2" class="font">ABC</td>
</tr>
</table>
Css
.font{
font-family:"Alvi Nastaleeq", Verdana, Arial, Helvetica, sans-serif;
color: #000000;
font-size:13px;
}