• 0

CSS Float and HTML


Question

Okay look at the following code:

THE CSS

.shadbotright2 { background: url(style_images/LunaElement/shad_bot_right2.gif) #3873b3; float:right; height: 79px; width: 24px; }
.shadbotleft2 { background: url(style_images/LunaElement/shad_bot_left2.gif) #3873b3; float:left; height: 79px; width: 24px; }


.shadleft { background: url(style_images/LunaElement/shad_left.gif) repeat-y left; padding-left: 15px; }
.shadright { background: url(style_images/LunaElement/shad_right.gif) repeat-y right; padding-right: 15px; }
.shadbotleft { background: url(style_images/LunaElement/shad_bot_left.gif) #3873b3; float: left; height: 24px; width: 79px; }
.shadbotmid { background: url(style_images/LunaElement/shad_bot_mid.gif) repeat-x; height: 24px; text-align: center; }
.shadbotright { background: url(style_images/LunaElement/shad_bot_right.gif) #3873b3; float: right; height: 24px; width: 79px; }

THE HTML

<div class="shadbotright2"></div><div class="shadbotleft2"></div><div class="shadleft"><div class="shadright">
<div class="borderwrap">
	<div class="maintitle">{$data['name']}</div><div class="borderwrap" style="padding: 0px;border:#5176B5 1px solid;border-top:0;">
	<table class='ipbtable' cellspacing="1">
		<tr> 
			<th align="left" colspan="2" width="66%">{ipb.lang['cat_name']}</th>
			<th align="center" width="7%">{ipb.lang['topics']}</th>
			<th align="center" width="7%">{ipb.lang['replies']}</th>
			<th align="left" width="35%">{ipb.lang['last_post_info']}</th>
		</tr>


	</table>
</div></div>
</div></div>
<div class="shadbotmid"><div class="shadbotleft"></div><div class="shadbotright"></div></div>
<br /><br />

Okay so this is for a IPB forum, and basically i'm wanting to add a shadow effect to the table, i've got it pretty much working apart from the two left and right graphics, which arnt floating where i want them, they are floating ontop of the actual table and messing it up, i've tried z-index: -100000; and its still not working, any ideas?

Heres a screenshot of it:

post-108467-1148131619_thumb.jpg

Link to comment
https://www.neowin.net/forum/topic/462804-css-float-and-html/
Share on other sites

2 answers to this question

Recommended Posts

  • 0

i havent looked at your code but this is how ive done shadowing, works in firefox & ie

.border_t { background: url(images/t.jpg) repeat-x; }
.border_b { background: url(images/b.jpg) repeat-x; }
.border_tr { background: url(images/tr.jpg) no-repeat right; }
.border_br { background: url(images/br.jpg) no-repeat right; }
.border_tl { background: url(images/tl.jpg) no-repeat; padding: 10px 0 0 10px; }
.border_bl { background: url(images/bl.jpg) no-repeat; padding: 10px 0 0 10px; }
.border_r { background: url(images/r.jpg) repeat-y right; padding: 0 10px 0 0; }
.border_l { background: url(images/l.jpg) repeat-y left; padding: 0 0 0 10px; }

note 10px is used because thats the height & width of my images

<div class="border_t"><div class="border_tr"><div class="border_tl"></div></div></div>
<div class="border_l"><div class="border_r">
	<div id="bodyWrapper">
		jhgjrtretewtre
	</div>
</div></div>
<div class="border_b"><div class="border_br"><div class="border_bl"></div></div></div>

hope it helps

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Popular Now

  • Posts

    • Meta says you'll soon be getting ads on WhatsApp by David Uzondu No, the headline is not clickbait. WhatsApp is getting ads. For years, the messaging app has been the golden child, bought by Meta for $19 billion back in 2014 and left mostly untouched. That long, ad-free holiday is officially over. Your private chats with friends and family are safe for now, as the ads will not appear there. Instead, they will be sandwiched between Status updates, just like you already see them in Instagram Stories. Apart from ads in Statuses, Meta is also letting people pay to promote their Channels. This means businesses and creators can pay to get their broadcast channels discovered by more users. A few will even be able to charge for subscriptions to their channels for exclusive content. The company says it will not take a fee from these subscriptions at first, but that is probably not going to last forever. Meta is a business, after all, not a charity. Meta has tried to calm everyone down by saying your personal chats and calls will remain encrypted and untouched. The company claims it only uses general information like your country and language, plus the channels you follow, to figure out which ads to show you. However, if you have linked your WhatsApp to Meta's Account Center, then your ad preferences from Facebook and Instagram will follow you. This entire plan certainly excited Wall Street. After the news broke, Meta's stock climbed 2.8% in pre-market trading, as investors salivated over the prospect of finally monetizing WhatsApp's 2 billion+ users. Ads in messaging apps are not new at all. Take Telegram, for example. The app shows sponsored messages in large public channels, but it also gives users a way out. For a monthly fee, you can get Telegram Premium, and all those ads disappear (plus a bunch of advanced paid features). Maybe, in the future, WhatsApp will offer a similar premium service for people willing to pay to escape the ads.
    • To say that it's build in America, they can build it somewhere else and just put the back cover on the smartphone in America et put it in a box. On some country they put just the last screw to finish the product
    • "The T1 phone will be designed and built in America." I was looking for this information and wasn't disappointed! 👍🏻
  • Recent Achievements

    • Week One Done
      patrickft456 earned a badge
      Week One Done
    • One Month Later
      patrickft456 earned a badge
      One Month Later
    • One Month Later
      Jdoe25 earned a badge
      One Month Later
    • Explorer
      Legend20 went up a rank
      Explorer
    • One Month Later
      jezzzy earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      639
    2. 2
      ATLien_0
      281
    3. 3
      +FloatingFatMan
      172
    4. 4
      Michael Scrip
      156
    5. 5
      Steven P.
      129
  • Tell a friend

    Love Neowin? Tell a friend!