vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   how to assign border to just three sides? (https://vborg.vbsupport.ru/showthread.php?t=296772)

K4GAP 04-01-2013 06:22 PM

how to assign border to just three sides?
 
SOLVED!



Is it possible to assign a border color to only three sides of an area?

Such as in the image below I want to assign a colored border to only bottom and both right and left of the navbar area. Red arrow marks the border I want to get rid of.

Is this doable?


http://www.livinginkentucky.com/file.../navscreen.png

kh99 04-01-2013 09:59 PM

It is possible, you can use CSS to specify the border width of each side separately, so you could spcify 0 for the top. But we probably can't tell you exactly how to do it without a link (well, I can't anyway).

K4GAP 04-01-2013 11:18 PM

Quote:

Originally Posted by kh99 (Post 2413748)
It is possible, you can use CSS to specify the border width of each side separately, so you could spcify 0 for the top. But we probably can't tell you exactly how to do it without a link (well, I can't anyway).

I found all kinds of code but have no idea where to put it.

Example of what I found:

Code:

div {    border-top:    1px solid red;  border-right:  1px solid red;    border-bottom: 1px solid red; }

peugeot405 04-01-2013 11:30 PM

can you post a link to your web?

try using this:

Code:

border-color: red;
border-style: solid;
border-width: 0 1px 1px;


K4GAP 04-02-2013 01:39 AM

Quote:

Originally Posted by peugeot405 (Post 2413758)
can you post a link to your web?

try using this:

Code:

border-color: red;
border-style: solid;
border-width: 0 1px 1px;


The problem now is where to put the code. I have several code snippets that will do the job. I just don't know where to put it.

kh99 04-02-2013 01:45 AM

You should download Firefox, if you don't use it already, then install the free add-on called firebug. Then you can load your page, right click on the part you're interested and select "Inspect Element with Firebug". It opens a window that shows the html and what CSS is being applied to it, so you could figure out what CSS selector will work to override it. (I think Chrome has something similar built in, but I don't remember how much it lets you do).

Anyone can do this if they can get to your site, which is why people usually ask for a link for questions like this (it's hard to know exactly what line you want to eliminate just by looking at the picture, but firebug makes it easy). It might sound like a lot of work just to figure out this CSS, but if you like doing your own styles I think you'd find that the time spent figuring it out would pay off in the long run.

K4GAP 04-02-2013 02:49 AM

Quote:

Originally Posted by kh99 (Post 2413781)
You should download Firefox, if you don't use it already, then install the free add-on called firebug. Then you can load your page, right click on the part you're interested and select "Inspect Element with Firebug". It opens a window that shows the html and what CSS is being applied to it, so you could figure out what CSS selector will work to override it. (I think Chrome has something similar built in, but I don't remember how much it lets you do).

Anyone can do this if they can get to your site, which is why people usually ask for a link for questions like this (it's hard to know exactly what line you want to eliminate just by looking at the picture, but firebug makes it easy). It might sound like a lot of work just to figure out this CSS, but if you like doing your own styles I think you'd find that the time spent figuring it out would pay off in the long run.

I've always used Firefox and I know where to change the border settings. The problem is the setting only asks for border color/thickness and applies it to all sides. Tried all this in the beginning, about 6 hours ago.

kh99 04-02-2013 07:39 AM

OK, sorry, I guess I misunderstood the question. You can add your CSS to the additional.css template for that style (under the CSS Templates group).

K4GAP 04-02-2013 08:06 AM

Adding it into the additional.css the code has to be assigned to the navbar in some manner? So how would that look?

For example if I was using this code ...

"border-color: red; border-style: solid; border-width: 0 1px 1px;"

what would be added to it in order for it to be applied to the navbar?

kh99 04-02-2013 12:09 PM

You would need the correct CSS selector. I understand now why there's confusion - you've been customizing the site using the style variables. So I guess the answer to the original question is that you can't do it with style vars, you need to use CSS. And while there's no place to enter CSS just for the navbar, you can probably come up with a selector so that it will only apply to the navbar, (and the firebug thing can help with that).

Anyway, maybe try the div that has id "navbar", like:

Code:

#navbar {    border-top:    1px solid red;  border-right:  1px solid red;    border-bottom: 1px solid red; }


All times are GMT. The time now is 01:10 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01383 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete