homepage Welcome to WebmasterWorld Guest from 54.204.249.184
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Trouble setting div link class font size
Cannot get the links in a div to go to 1.03 em
cheaperholidays




msg:4393353
 9:25 am on Dec 2, 2011 (gmt 0)

Hi all

I am trying to get links in a series of divs to accept a font size of 1.03em

Body font is set to 100% our css is as follows
the link class is "sbrtd"

#weather{margin-top:20px;width:100%;clear:both;overflow: hidden;
}

#canaries, #africa, #caribbean, #med{float:left;text-align:center;border:solid 1px #DBDBDB;}
#canaries{width:19%;text-align:left;margin:6px 8px 15px;padding:10px;}
#africa{width:19%;text-align:left;margin:6px 8px 15px;padding:10px;}
#caribbean{width:19%;text-align:left;margin:6px 8px 15px;padding:10px;}
#med{width:19%;text-align:left;margin:6px 12px 8px;padding:10px;}


/*.sbr{color:#990000; padding:5px;text-decoration:none;font-weight:bold;margin-left:7px}*/
#canaries a.sbr{text-align:center;padding:8px;color:#990000;text-decoration:none;font-weight:bold;}
#canaries a.sbr:hover{color:#A40506;text-decoration:underline;font-weight:bold}
#africa a.sbr{padding:8px;color:#990000;text-decoration:none;font-weight:bold}
#africa a.sbr:hover{color:#A40506;text-decoration:underline;font-weight:bold}
#caribbean a.sbr{padding:8px;color:#990000;text-decoration:none;font-weight:bold}
#caribbean a.sbr:hover{color:#A40506;text-decoration:underline;font-weight:bold}
#med a.sbr{padding:8px;color:#990000;text-decoration:none;font-weight:bold}
#med a.sbr:hover{color:#A40506;text-decoration:underline;font-weight:bold}

#canaries a.sbrtd,#caribbean a.sbrtd,#africa a.sbrtd,#med a.sbrtd {padding:0 8px;font-size:1.03em;font-weight:400;text-decoration:none;}


I have tried varios combinations, but nothing seems to work.


Kind regards

Mike

 

lucy24




msg:4393373
 9:49 am on Dec 2, 2011 (gmt 0)

We'll need to see a bit of the html that calls the css.

Also note that very small changes in font size can be iffy. Anything less than 5% simply may not show up, unless the font is pretty large to start with. Fetch out the calculator: what's 103% of 14? The browser may well decide it's ... 14.

cheaperholidays




msg:4393375
 9:54 am on Dec 2, 2011 (gmt 0)

Hi Lucy 24

Here you go

<div id="weather"><div id="canaries"><a href="http://www.example.com/canary.php" class="sbr" title="Canaries">The Place</a><p>
<a class="sbrtd" title="weather" href="http://www.example.com/">Ventures</a>

[edited by: alt131 at 1:52 pm (utc) on Dec 6, 2011]
[edit reason] Thread Tidy [/edit]

cheaperholidays




msg:4393390
 10:43 am on Dec 2, 2011 (gmt 0)

Update: Fixed''' changed the body font to 100% and upped the link size to 1.06em

I hope this helps anyone else

lucy24




msg:4393480
 5:26 pm on Dec 2, 2011 (gmt 0)

Yes, 1.06 is generally enough to push it up one point. But unless you've got something wonky going on, it shouldn't be necessary to specify 100%. That's the default, after all.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved